This commit is contained in:
Philipp Kühn
2020-11-13 16:44:26 +01:00
37 changed files with 469 additions and 51 deletions

View File

@@ -74,6 +74,9 @@ const CodeBlock = createNode({
addCommands() {
return {
/**
* Toggle a code block
*/
codeBlock: (attrs?: CodeBlockOptions): Command => ({ commands }) => {
return commands.toggleBlockType('codeBlock', 'paragraph', attrs)
},