slate-ng
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Slate Ng

中文文档 | English Doc

Demo

https://chongqiangchen.github.io/slate-ng/

Quick Start:

  1. install: npm install slate-ng slate slate-history @angular/cdk
  2. import module: SlateNgModule
  3. use ns-editor, ex:
// html
<div
  ns-editor
  [editor]="editor"
  [value]="value"
  placeholder="enter some"
></div>

// ts
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.less'],
  providers: [NsEditorService, NsDepsService, RegistryNsElement]
})
export class AppComponent {
  editor = withAngular(createEditor());
  value = [
    {
      type: 'paragraph',
      children: [{text: ''}]
    }
  ]
}

If you want to know more usage, you can refer to slate-ng demo code

LICENSE

MIT License

Package Sidebar

Install

npm i slate-ng

Weekly Downloads

2

Version

0.1.2

License

MIT

Unpacked Size

1.66 MB

Total Files

87

Last publish

Collaborators

  • 0xfourdim