Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s committed Jul 15, 2023
1 parent 3ac4c17 commit 3afff48
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,48 +88,6 @@ Then in HTML

Note: Input can be a HTML string or a jsonDoc

### Working with HTML

If the Input to the component is HTML, output will be HTML. To manually convert json output from the editor to html

```ts
import { toHTML } from 'ngx-editor';

const html = toHTML(jsonDoc, schema); // schema is optional
```

Or to convert HTML to json. Optional, as Editor will accept HTML input

```ts
import { toDoc } from 'ngx-editor';

const jsonDoc = toDoc(html);
```

### Commands

```ts
this.editor.commands.textColor('red').insertText('Hello world!').focus().scrollIntoView().exec();
```

Run `exec` to apply the changes to the editor.

### Optional Configuration

You can specify locals to be used in the editor

```ts
NgxEditorModule.forRoot({
locals: {
bold: 'Bold',
italic: 'Italic',
code: 'Code',
underline: 'Underline',
// ...
},
});
```

## Browser Compatibility

Mostly works on all Evergreen-Browsers like
Expand All @@ -140,10 +98,6 @@ Mostly works on all Evergreen-Browsers like
- Safari
- Opera

## Angular Compatibility

Angular 14+.

## Collaborative Editing

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

0 comments on commit 3afff48

Please sign in to comment.