ng2-quill-editor

WebJar for ng2-quill-editor

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

ng2-quill-editor
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

ng2-quill-editor
WebJar for ng2-quill-editor
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/surmon-china/ngx-quill-editor

Download ng2-quill-editor

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/ng2-quill-editor/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>ng2-quill-editor</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/ng2-quill-editor/
implementation 'org.webjars.npm:ng2-quill-editor:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/ng2-quill-editor/
implementation ("org.webjars.npm:ng2-quill-editor:2.0.0")
'org.webjars.npm:ng2-quill-editor:jar:2.0.0'
<dependency org="org.webjars.npm" name="ng2-quill-editor" rev="2.0.0">
  <artifact name="ng2-quill-editor" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='ng2-quill-editor', version='2.0.0')
)
libraryDependencies += "org.webjars.npm" % "ng2-quill-editor" % "2.0.0"
[org.webjars.npm/ng2-quill-editor "2.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : quill jar [1.1.7,2)

Project Modules

There are no modules declared in this project.

THIS PROJECT IS DEPRECATED

Component is not maintained anymore.

Please consider using ngx-quill.


GitHub issues GitHub forks GitHub stars GitHub license No Maintenance Intended

ngx-quill-editor

Quill editor for AngularX.

基于 Quill、适用于 AngularX 的富文本编辑器。

Example

Demo Page

Installation

npm install ngx-quill-editor --save

Sample

Include QuillEditorModule in your main module:

import { QuillEditorModule } from 'ngx-quill-editor';

@NgModule({
  // ...
  imports: [
    QuillEditorModule
  ],
  // ...
})
export class AppModule {}

Then use it in your component:

<!-- use with ngModel -->
<quill-editor
  [(ngModel)]="editorContent"
  [options]="editorOptions"
  (blur)="onEditorBlured($event)"
  (focus)="onEditorFocused($event)"
  (ready)="onEditorCreated($event)"
  (change)="onContentChanged($event)"
></quill-editor>


<!-- or use with formControl -->
<quill-editor
  class="form-control"
  [formControl]="editorContent"
  [options]="editorOptions"
  (blur)="onEditorBlured($event)"
  (focus)="onEditorFocused($event)"
  (ready)="onEditorCreated($event)"
  (change)="onContentChanged($event)"
></quill-editor>
import { Component } from '@angular/core';

@Component({
  selector: 'sample',
  template: require('./sample.html')
})
export class Sample {

  public editor;
  public editorContent = `<h3>I am Example content</h3>`;
  public editorOptions = {
    placeholder: "insert content..."
  };

  constructor() {}

  onEditorBlured(quill) {
    console.log('editor blur!', quill);
  }

  onEditorFocused(quill) {
    console.log('editor focus!', quill);
  }

  onEditorCreated(quill) {
    this.editor = quill;
    console.log('quill is ready! this is current quill instance object', quill);
  }

  onContentChanged({ quill, html, text }) {
    console.log('quill content is changed!', quill, html, text);
  }

  ngOnInit() {
    setTimeout(() => {
      this.editorContent = '<h1>content changed!</h1>';
      console.log('you can use the quill instance object to do something', this.editor);
      // this.editor.disable();
    }, 2800)
  }
}

Configuration

Versions

Version
2.0.0