mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-15 11:09: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. |
|
||||
| `getJSON` | – | Get the current content as JSON. |
|
||||
| `getHTML` | – | Get the current content as HTML. |
|
||||
| `focus` | — | Focus the editor |
|
||||
| `destroy` | – | Destroys the editor. |
|
||||
| `focus` | – | Focus the editor. |
|
||||
| `blur` | – | Blur the editor. |
|
||||
| `destroy` | – | Destroy the editor. |
|
||||
|
||||
## Components
|
||||
|
||||
|
@ -298,6 +298,10 @@ export default class Editor {
|
||||
this.view.focus()
|
||||
}
|
||||
|
||||
blur() {
|
||||
this.view.dom.blur()
|
||||
}
|
||||
|
||||
getHTML() {
|
||||
const div = document.createElement('div')
|
||||
const fragment = DOMSerializer
|
||||
|
Loading…
Reference in New Issue
Block a user