Skip to content

Commit

Permalink
Merge pull request #103 from beeplin/master
Browse files Browse the repository at this point in the history
docs: Update REAMDE.md: wrapIn -> toggleWrap
  • Loading branch information
philippkuehn committed Nov 20, 2018
2 parents 9cb9a89 + 78b7272 commit c7043d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -300,7 +300,7 @@ Let's take a look at a real example. This is basically how the default `blockquo

```js
import { Node } from 'tiptap'
import { wrappingInputRule, setBlockType, wrapIn } from 'tiptap-commands'
import { wrappingInputRule, setBlockType, toggleWrap } from 'tiptap-commands'

export default class BlockquoteNode extends Node {

Expand Down Expand Up @@ -333,14 +333,14 @@ export default class BlockquoteNode extends Node {
// `type` is the prosemirror schema object for this blockquote
// `schema` is a collection of all registered nodes and marks
commands({ type, schema }) {
return wrapIn(type)
return () => toggleWrap(type)
}

// here you can register some shortcuts
// in this case you can create a blockquote with `ctrl` + `>`
keys({ type }) {
return {
'Ctrl->': wrapIn(type),
'Ctrl->': toggleWrap(type),
}
}

Expand Down

0 comments on commit c7043d1

Please sign in to comment.