Skip to content

Commit

Permalink
docs: update migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s committed Feb 19, 2021
1 parent 40aa548 commit 0002cba
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion docs/migration-7-8.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ new Editor({
});
```

#### Removed Editor.focus and Editor.blur methods
#### Removed Editor.focus and Editor.blur events

```ts
const editor = new Editor();
Expand All @@ -71,6 +71,34 @@ editor.focus.subscribe(() => {}); // no longer exposed
editor.blur.subscribe(() => {}); // no longer exposed
```

Alternatively you can use the props on the editor component for the same

```html
<ngx-editor
[editor]="editor"
focusOut="onBlur()"
focusIn="onFocus()"
></ngx-editor>
```

#### Remvoed Editor.enable and Editor.disable methods

**Before:**

```ts
const editor = new Editor({});

editor.enable(); // enable edititng

editor.disable(); // disable editing
```

**After:**

```html
<ngx-editor [editor]="editor" enabled="true"></ngx-editor>
```

#### Miscellaneous

- Some CSS Bug fixes might affect existing components

0 comments on commit 0002cba

Please sign in to comment.