Giter Site home page Giter Site logo

jecraig / ngx-editor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sibiraj-s/ngx-editor

0.0 0.0 0.0 16.66 MB

๐Ÿ–‹๏ธ Rich Text Editor for angular using ProseMirror

Home Page: https://sibiraj-s.github.io/ngx-editor/

License: MIT License

Shell 0.16% JavaScript 0.44% TypeScript 88.36% HTML 6.12% SCSS 4.92%

ngx-editor's Introduction

NgxEditor

ngxEditor

The Rich Text Editor for Angular, Built on ProseMirror

Tests npm version npm npm
licence

A simple rich text editor for angular applications built with ProseMirror. It is a drop in and easy-to-use editor and can be easily extended using prosemirror plugins to build any additional or missing features

Getting Started

demo | edit on stackblitz | documentation | migrating from other editors

Installation

Install via Package managers such as npm or pnpm or yarn

npm install ngx-editor
# or
pnpm install ngx-editor
# or
yarn add ngx-editor

Usage

Note: By default the editor comes with minimal features. Refer the demo and documentation for more details and examples.

Import ngx-editor module

import { NgxEditorModule } from 'ngx-editor';

@NgModule({
  imports: [NgxEditorModule],
})
export class AppModule {}

Component

import { Editor } from 'ngx-editor';

export class EditorComponent implements OnInit, OnDestroy {
  editor: Editor;
  html = '';

  ngOnInit(): void {
    this.editor = new Editor();
  }

  // make sure to destory the editor
  ngOnDestroy(): void {
    this.editor.destroy();
  }
}

Then in HTML

<div class="NgxEditor__Wrapper">
  <ngx-editor-menu [editor]="editor"> </ngx-editor-menu>
  <ngx-editor [editor]="editor" [ngModel]="html" [disabled]="false" [placeholder]="'Type here...'"></ngx-editor>
</div>

Note: Input can be a HTML string or a jsonDoc

Browser Compatibility

Mostly works on all Evergreen-Browsers like

  • Google Chrome
  • Microsoft Edge
  • Mozilla Firefox
  • Safari
  • Opera

Collaborative Editing

See https://sibiraj-s.github.io/ngx-editor/#/collab

Icons

Icons are from https://fonts.google.com/icons

Contributing

All contributions are welcome. See CONTRIBUTING.md to get started.

ngx-editor's People

Contributors

sibiraj-s avatar dependabot[bot] avatar ludoviccarretti avatar raphael-inglin-ergon avatar schmoizz avatar asgerrud avatar dorifor avatar florianpasteur avatar fredmabire avatar giovannidias1 avatar jorgeucano avatar nathankun avatar matemahinkhan avatar mabdullahsari avatar paulirwin avatar robozoom avatar senthil090 avatar ssuperczynski avatar cselt avatar vitaaaly avatar vladimirhumeniuk avatar volodymyro-in6k avatar clemdesign avatar graves501 avatar jonnyfux avatar rolancia avatar oxygen-js avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.