mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-15 02:59:01 +08:00
add blur function, fix #196
This commit is contained in:
parent
4e4c2dd0b9
commit
c63b9aafc9
@ -87,8 +87,9 @@ export default {
|
|||||||
| `registerPlugin` | `plugin` | Register a Prosemirror plugin. |
|
| `registerPlugin` | `plugin` | Register a Prosemirror plugin. |
|
||||||
| `getJSON` | – | Get the current content as JSON. |
|
| `getJSON` | – | Get the current content as JSON. |
|
||||||
| `getHTML` | – | Get the current content as HTML. |
|
| `getHTML` | – | Get the current content as HTML. |
|
||||||
| `focus` | — | Focus the editor |
|
| `focus` | – | Focus the editor. |
|
||||||
| `destroy` | – | Destroys the editor. |
|
| `blur` | – | Blur the editor. |
|
||||||
|
| `destroy` | – | Destroy the editor. |
|
||||||
|
|
||||||
## Components
|
## Components
|
||||||
|
|
||||||
|
@ -298,6 +298,10 @@ export default class Editor {
|
|||||||
this.view.focus()
|
this.view.focus()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blur() {
|
||||||
|
this.view.dom.blur()
|
||||||
|
}
|
||||||
|
|
||||||
getHTML() {
|
getHTML() {
|
||||||
const div = document.createElement('div')
|
const div = document.createElement('div')
|
||||||
const fragment = DOMSerializer
|
const fragment = DOMSerializer
|
||||||
|
Loading…
Reference in New Issue
Block a user