Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
ng2-quill-editor
Advanced tools
Quill editor for Angular2.
基于Quill、适用于Angular2的富文本编辑器。
npm install ng2-quill-editor --save
npm install --save-dev @types/quill
Include QuillEditorModule in your main module:
import { QuillEditorModule } from 'ng2-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)
}
}
FAQs
Quill editor component for Angular2
We found that ng2-quill-editor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.