udecode / plate

Rich-text editor with shadcn
https://platejs.org
Other
10.41k stars 643 forks source link

Code Block Error - Single Line #3407

Open remusris opened 1 month ago

remusris commented 1 month ago

Description

When you have a single code block on page you get this error

Delete everything in the code block then start typing when it's empty and you'll get the error below

Error: Cannot find a descendant at path [1,1] in node: {"children":[{"id":"4jfkls","type":"p","children":[{"text":""}]},{"id":"1","type":"code_block","children":[{"text":"f"}]},{"children":[{"text":""}],"type":"p","id":"0a93l"}],"operations":[{"type":"insert_node","path":[1,1],"node":{"text":"f"}},{"type":"set_selection","properties":{"anchor":{"path":[1,0],"offset":0},"focus":{"path":[1,0],"offset":0}},"newProperties":{"anchor":{"path":[1,1],"offset":1},"focus":{"path":[1,1],"offset":1}}},{"type":"remove_node","path":[1,0],"node":{"text":"","type":"code_line"}}],"selection":{"anchor":{"path":[1,0],"offset":1},"focus":{"path":[1,0],"offset":1}},"marks":null,"id":"jwaS2VJ6MPkQjqnF5CGgk","prevSelection":{"anchor":{"path":[1,0],"offset":0},"focus":{"path":[1,0],"offset":0}},"isFallback":false,"currentKeyboardEvent":null,"plate":{"set":{}},"key":0.005925071184135211,"plugins":[{"key":"react","type":"react","options":{},"inject":{},"editor":{}},{"key":"history","type":"history","options":{},"inject":{},"editor":{}},{"key":"nodeFactory","type":"nodeFactory","options":{},"inject":{},"editor":{}},{"handlers":{},"key":"event-editor","type":"event-editor","options":{},"inject":{},"editor":{}},{"key":"inline-void","type":"inline-void","options":{},"inject":{},"editor":{}},{"key":"insertData","type":"insertData","options":{},"inject":{},"editor":{}},{"handlers":{},"key":"prevSelection","type":"prevSelection","options":{},"inject":{},"editor":{}},{"key":"deserializeHtml","editor":{"insertData":{"format":"text/html"}},"_thenReplaced":1,"type":"deserializeHtml","options":{},"inject":{}},{"editor":{"insertData":{"format":"application/x-slate-fragment"}},"key":"deserializeAst","type":"deserializeAst","options":{},"inject":{}},{"key":"editorProtocol","type":"editorProtocol","options":{},"inject":{},"editor":{}},{"deserializeHtml":{"rules":[{"validNodeName":"P"}]},"component":{},"handlers":{},"isElement":true,"key":"p","options":{"hotkey":["mod+opt+0","mod+shift+0"]},"type":"p","inject":{},"editor":{}},{"key":"heading","plugins":[{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"H1"}]},"handlers":{},"isElement":true,"key":"h1","options":{"hotkey":["mod+opt+1","mod+shift+1"]},"type":"h1","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"H2"}]},"handlers":{},"isElement":true,"key":"h2","options":{"hotkey":["mod+opt+2","mod+shift+2"]},"type":"h2","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"H3"}]},"handlers":{},"isElement":true,"key":"h3","options":{"hotkey":["mod+opt+3","mod+shift+3"]},"type":"h3","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"H4"}]},"handlers":{},"isElement":true,"key":"h4","options":{},"type":"h4","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"H5"}]},"handlers":{},"isElement":true,"key":"h5","options":{},"type":"h5","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"H6"}]},"handlers":{},"isElement":true,"key":"h6","options":{},"type":"h6","inject":{},"editor":{}}],"options":{"levels":[1,2,3,4,5,6]},"_thenReplaced":2,"type":"heading","inject":{},"editor":{}},{"deserializeHtml":{"rules":[{"validNodeName":"H1"}]},"component":{},"handlers":{},"isElement":true,"key":"h1","options":{"hotkey":["mod+opt+1","mod+shift+1"]},"type":"h1","inject":{},"editor":{}},{"deserializeHtml":{"rules":[{"validNodeName":"H2"}]},"component":{},"handlers":{},"isElement":true,"key":"h2","options":{"hotkey":["mod+opt+2","mod+shift+2"]},"type":"h2","inject":{},"editor":{}},{"deserializeHtml":{"rules":[{"validNodeName":"H3"}]},"component":{},"handlers":{},"isElement":true,"key":"h3","options":{"hotkey":["mod+opt+3","mod+shift+3"]},"type":"h3","inject":{},"editor":{}},{"deserializeHtml":{"rules":[{"validNodeName":"H4"}]},"component":{},"handlers":{},"isElement":true,"key":"h4","options":{},"type":"h4","inject":{},"editor":{}},{"deserializeHtml":{"rules":[{"validNodeName":"H5"}]},"component":{},"handlers":{},"isElement":true,"key":"h5","options":{},"type":"h5","inject":{},"editor":{}},{"deserializeHtml":{"rules":[{"validNodeName":"H6"}]},"component":{},"handlers":{},"isElement":true,"key":"h6","options":{},"type":"h6","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"BLOCKQUOTE"}]},"handlers":{},"isElement":true,"key":"blockquote","options":{"hotkey":"mod+shift+."},"type":"blockquote","inject":{},"editor":{}},{"component":{},"key":"code_block","inject":{"pluginsByKey":{"deserializeHtml":{"editor":{"insertData":{}}}}},"deserializeHtml":{"rules":[{"validNodeName":"PRE"},{"validNodeName":"P","validStyle":{"fontFamily":"Consolas"}}]},"handlers":{},"isElement":true,"options":{"hotkey":["mod+opt+8","mod+shift+8"],"syntax":true,"syntaxPopularFirst":false},"plugins":[{"component":{},"isElement":true,"key":"code_line","type":"code_line","options":{},"inject":{},"editor":{}},{"component":{},"isLeaf":true,"key":"code_syntax","type":"code_syntax","options":{},"inject":{},"editor":{}}],"_thenReplaced":2,"type":"code_block","editor":{}},{"component":{},"isElement":true,"key":"code_line","type":"code_line","options":{},"inject":{},"editor":{}},{"component":{},"isLeaf":true,"key":"code_syntax","type":"code_syntax","options":{},"inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"HR"}]},"isElement":true,"isVoid":true,"key":"hr","type":"hr","options":{},"inject":{},"editor":{}},{"component":{},"key":"a","deserializeHtml":{"rules":[{"validNodeName":"A"}]},"isElement":true,"isInline":true,"options":{"allowedSchemes":["http","https","mailto","tel"],"dangerouslySkipSanitization":false,"defaultLinkAttributes":{},"keepSelectedTextOnPaste":true,"rangeBeforeOptions":{"afterMatch":true,"matchString":" ","skipInvalid":true},"triggerFloatingLinkHotkeys":"meta+k, ctrl+k"},"_thenReplaced":2,"type":"a","inject":{},"editor":{}},{"editor":{"insertData":{}},"component":{},"key":"img","deserializeHtml":{"rules":[{"validNodeName":"IMG"}]},"isElement":true,"isVoid":true,"_thenReplaced":2,"type":"img","options":{},"inject":{}},{"component":{},"key":"media_embed","deserializeHtml":{"rules":[{"validNodeName":"IFRAME"}]},"isElement":true,"isVoid":true,"options":{},"_thenReplaced":2,"type":"media_embed","inject":{},"editor":{}},{"options":{"pluginKeys":["img","media_embed"]},"handlers":{},"key":"caption","type":"caption","inject":{},"editor":{}},{"component":{},"isElement":true,"isInline":true,"isMarkableVoid":true,"isVoid":true,"key":"mention","options":{"trigger":"@","triggerPreviousCharPattern":{}},"plugins":[{"component":{},"isElement":true,"isInline":true,"isVoid":true,"key":"mention_input","type":"mention_input","options":{},"inject":{},"editor":{}}],"type":"mention","inject":{},"editor":{}},{"component":{},"isElement":true,"isInline":true,"isVoid":true,"key":"mention_input","type":"mention_input","options":{},"inject":{},"editor":{}},{"component":{},"key":"table","options":{"_cellIndices":{},"enableMerging":false,"minColumnWidth":48},"deserializeHtml":{"rules":[{"validNodeName":"TABLE"}]},"handlers":{},"isElement":true,"plugins":[{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"TR"}]},"isElement":true,"key":"tr","type":"tr","options":{},"inject":{},"editor":{}},{"component":{},"isElement":true,"key":"td","_thenReplaced":3,"type":"td","options":{},"inject":{},"editor":{}},{"component":{},"isElement":true,"key":"th","_thenReplaced":3,"type":"th","options":{},"inject":{},"editor":{}}],"_thenReplaced":2,"type":"table","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"TR"}]},"isElement":true,"key":"tr","type":"tr","options":{},"inject":{},"editor":{}},{"key":"td","component":{},"deserializeHtml":{"attributeNames":["rowspan","colspan"],"rules":[{"validNodeName":"TD"}]},"isElement":true,"_thenReplaced":3,"type":"td","options":{},"inject":{},"editor":{}},{"key":"th","component":{},"deserializeHtml":{"attributeNames":["rowspan","colspan"],"rules":[{"validNodeName":"TH"}]},"isElement":true,"_thenReplaced":3,"type":"th","options":{},"inject":{},"editor":{}},{"component":{},"handlers":{},"isElement":true,"key":"action_item","options":{"hotkey":["mod+opt+4","mod+shift+4"]},"type":"action_item","inject":{},"editor":{}},{"component":{},"isElement":true,"isVoid":true,"key":"excalidraw","type":"excalidraw","options":{},"inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["STRONG","B"]},{"validStyle":{"fontWeight":["600","700","bold"]}}]},"handlers":{},"isLeaf":true,"key":"bold","options":{"hotkey":"mod+b"},"type":"bold","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["EM","I"]},{"validStyle":{"fontStyle":"italic"}}]},"handlers":{},"isLeaf":true,"key":"italic","options":{"hotkey":"mod+i"},"type":"italic","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["U"]},{"validStyle":{"textDecoration":["underline"]}}]},"handlers":{},"isLeaf":true,"key":"underline","options":{"hotkey":"mod+u"},"type":"underline","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["S","DEL","STRIKE"]},{"validStyle":{"textDecoration":"line-through"}}]},"handlers":{},"isLeaf":true,"key":"strikethrough","options":{"hotkey":"mod+shift+x"},"type":"strikethrough","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["CODE"]},{"validStyle":{"fontFamily":"Consolas"}}]},"handlers":{},"isLeaf":true,"key":"code","options":{"hotkey":"mod+e"},"type":"code","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["SUB"]},{"validStyle":{"verticalAlign":"sub"}}]},"handlers":{},"isLeaf":true,"key":"subscript","options":{"clear":"superscript","hotkey":"mod+,"},"type":"subscript","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["SUP"]},{"validStyle":{"verticalAlign":"super"}}]},"handlers":{},"isLeaf":true,"key":"superscript","options":{"clear":"subscript","hotkey":"mod+."},"type":"superscript","inject":{},"editor":{}},{"key":"color","deserializeHtml":{"isLeaf":true,"rules":[{"validStyle":{"color":"*"}}]},"inject":{"props":{"defaultNodeValue":"black","nodeKey":"color"}},"_thenReplaced":2,"type":"color","options":{},"editor":{}},{"key":"backgroundColor","deserializeHtml":{"isLeaf":true,"rules":[{"validStyle":{"backgroundColor":"*"}}]},"inject":{"props":{"nodeKey":"backgroundColor"}},"_thenReplaced":2,"type":"backgroundColor","options":{},"editor":{}},{"key":"fontSize","deserializeHtml":{"isLeaf":true,"rules":[{"validStyle":{"fontSize":"*"}}]},"inject":{"props":{"nodeKey":"fontSize"}},"_thenReplaced":2,"type":"fontSize","options":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["MARK"]}]},"handlers":{},"isLeaf":true,"key":"highlight","options":{"hotkey":"mod+shift+h"},"type":"highlight","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["KBD"]}]},"handlers":{},"isLeaf":true,"key":"kbd","type":"kbd","options":{},"inject":{},"editor":{}},{"key":"align","inject":{"props":{"validTypes":["p","h1","h2","h3"],"defaultNodeValue":"start","nodeKey":"align","styleKey":"textAlign","validNodeValues":["start","left","center","right","end","justify"]},"pluginsByKey":{"p":{"deserializeHtml":{}},"h1":{"deserializeHtml":{}},"h2":{"deserializeHtml":{}},"h3":{"deserializeHtml":{}}}},"_thenReplaced":2,"type":"align","options":{},"editor":{}},{"key":"indent","inject":{"props":{"validTypes":["p","h1","h2","h3","blockquote","code_block"],"nodeKey":"indent","styleKey":"marginLeft"}},"handlers":{},"options":{"offset":24,"unit":"px"},"_thenReplaced":2,"type":"indent","editor":{}},{"key":"listStyleType","inject":{"props":{"validTypes":["p","h1","h2","h3","blockquote","code_block"]},"pluginsByKey":{"deserializeHtml":{"editor":{"insertData":{}}}}},"deserializeHtml":{"isElement":true,"rules":[{"validNodeName":"LI"}]},"handlers":{},"options":{},"_thenReplaced":2,"type":"listStyleType","editor":{}},{"key":"lineHeight","inject":{"props":{"defaultNodeValue":1.5,"validNodeValues":[1,1.2,1.5,2,3],"validTypes":["p","h1","h2","h3"],"nodeKey":"lineHeight"},"pluginsByKey":{"p":{"deserializeHtml":{}},"h1":{"deserializeHtml":{}},"h2":{"deserializeHtml":{}},"h3":{"deserializeHtml":{}}}},"_thenReplaced":2,"type":"lineHeight","options":{},"editor":{}},{"options":{"rules":[{"mode":"block","type":"h1","match":"# "},{"mode":"block","type":"h2","match":"## "},{"mode":"block","type":"h3","match":"### "},{"mode":"block","type":"h4","match":"#### "},{"mode":"block","type":"h5","match":"##### "},{"mode":"block","type":"h6","match":"###### "},{"mode":"block","type":"blockquote","match":"> "},{"mode":"block","type":"code_block","match":"```","triggerAtBlockStart":false},{"mode":"block","type":"hr","match":["---","—-","___ "]},{"mode":"block","type":"list","match":["* ","- "]},{"mode":"block","type":"list","match":["1. ","1) "]},{"mode":"mark","type":["bold","italic"],"match":"***"},{"mode":"mark","type":["underline","italic"],"match":"__*"},{"mode":"mark","type":["underline","bold"],"match":"__**"},{"mode":"mark","type":["underline","bold","italic"],"match":"___***"},{"mode":"mark","type":"bold","match":"**"},{"mode":"mark","type":"underline","match":"__"},{"mode":"mark","type":"italic","match":"*"},{"mode":"mark","type":"italic","match":"_"},{"mode":"mark","type":"strikethrough","match":"~~"},{"mode":"mark","type":"superscript","match":"^"},{"mode":"mark","type":"subscript","match":"~"},{"mode":"mark","type":"highlight","match":"=="},{"mode":"mark","type":"highlight","match":"≡"},{"mode":"mark","type":"code","match":"`"},{"format":["“","”"],"match":"\"","mode":"text"},{"format":["‘","’"],"match":"'","mode":"text"},{"format":"—","match":"--","mode":"text"},{"format":"…","match":"...","mode":"text"},{"format":"»","match":">>","mode":"text"},{"format":"«","match":"<<","mode":"text"},{"format":"™","match":["(tm)","(TM)"],"mode":"text"},{"format":"®","match":["(r)","(R)"],"mode":"text"},{"format":"©","match":["(c)","(C)"],"mode":"text"},{"format":"™","match":"&trade;","mode":"text"},{"format":"®","match":"&reg;","mode":"text"},{"format":"©","match":"&copy;","mode":"text"},{"format":"§","match":"&sect;","mode":"text"},{"format":"→","match":"->","mode":"text"},{"format":"←","match":"<-","mode":"text"},{"format":"⇒","match":"=>","mode":"text"},{"format":"⇐","match":["<=","≤="],"mode":"text"},{"format":"≯","match":"!>","mode":"text"},{"format":"≮","match":"!<","mode":"text"},{"format":"≥","match":">=","mode":"text"},{"format":"≤","match":"<=","mode":"text"},{"format":"≱","match":"!>=","mode":"text"},{"format":"≰","match":"!<=","mode":"text"},{"format":"≠","match":"!=","mode":"text"},{"format":"≡","match":"==","mode":"text"},{"format":"≢","match":["!==","≠="],"mode":"text"},{"format":"≈","match":"~=","mode":"text"},{"format":"≉","match":"!~=","mode":"text"},{"format":"±","match":"+-","mode":"text"},{"format":"‰","match":"%%","mode":"text"},{"format":"‱","match":["%%%","‰%"],"mode":"text"},{"format":"÷","match":"//","mode":"text"},{"format":"½","match":"1/2","mode":"text"},{"format":"⅓","match":"1/3","mode":"text"},{"format":"¼","match":"1/4","mode":"text"},{"format":"⅕","match":"1/5","mode":"text"},{"format":"⅙","match":"1/6","mode":"text"},{"format":"⅐","match":"1/7","mode":"text"},{"format":"⅛","match":"1/8","mode":"text"},{"format":"⅑","match":"1/9","mode":"text"},{"format":"⅒","match":"1/10","mode":"text"},{"format":"⅔","match":"2/3","mode":"text"},{"format":"⅖","match":"2/5","mode":"text"},{"format":"¾","match":"3/4","mode":"text"},{"format":"⅗","match":"3/5","mode":"text"},{"format":"⅜","match":"3/8","mode":"text"},{"format":"⅘","match":"4/5","mode":"text"},{"format":"⅚","match":"5/6","mode":"text"},{"format":"⅝","match":"5/8","mode":"text"},{"format":"⅞","match":"7/8","mode":"text"},{"format":"°","match":"^o","mode":"text"},{"format":"⁺","match":"^+","mode":"text"},{"format":"⁻","match":"^-","mode":"text"},{"format":"₊","match":"~+","mode":"text"},{"format":"₋","match":"~-","mode":"text"},{"format":"⁰","match":"^0","mode":"text"},{"format":"¹","match":"^1","mode":"text"},{"format":"²","match":"^2","mode":"text"},{"format":"³","match":"^3","mode":"text"},{"format":"⁴","match":"^4","mode":"text"},{"format":"⁵","match":"^5","mode":"text"},{"format":"⁶","match":"^6","mode":"text"},{"format":"⁷","match":"^7","mode":"text"},{"format":"⁸","match":"^8","mode":"text"},{"format":"⁹","match":"^9","mode":"text"},{"format":"₀","match":"~0","mode":"text"},{"format":"₁","match":"~1","mode":"text"},{"format":"₂","match":"~2","mode":"text"},{"format":"₃","match":"~3","mode":"text"},{"format":"₄","match":"~4","mode":"text"},{"format":"₅","match":"~5","mode":"text"},{"format":"₆","match":"~6","mode":"text"},{"format":"₇","match":"~7","mode":"text"},{"format":"₈","match":"~8","mode":"text"},{"format":"₉","match":"~9","mode":"text"}],"enableUndoOnDelete":true},"handlers":{},"key":"autoformat","type":"autoformat","inject":{},"editor":{}},{"key":"blockSelection","options":{"sizes":{"top":0,"bottom":0,"left":4,"right":4},"query":{"maxLevel":1}},"handlers":{},"inject":{},"_thenReplaced":2,"type":"blockSelection","editor":{}},{"key":"dnd","options":{"enableScroller":true},"handlers":{},"_thenReplaced":2,"type":"dnd","inject":{},"editor":{}},{"options":{"rules":[{"hotkey":"mod+enter"},{"hotkey":"mod+shift+enter","before":true},{"hotkey":"enter","query":{"start":true,"end":true,"allow":["h1","h2","h3","h4","h5","h6"]},"relative":true,"level":1}]},"handlers":{},"key":"exitBreak","type":"exitBreak","inject":{},"editor":{}},{"key":"nodeId","options":{"filterText":true,"idKey":"id"},"type":"nodeId","inject":{},"editor":{}},{"options":{"rules":[{"types":["blockquote","action_item"],"defaultType":"p","hotkey":"Enter"},{"types":["blockquote","action_item"],"defaultType":"p","hotkey":"Backspace"},{"types":["code_block"],"defaultType":"p","hotkey":"Enter"},{"types":["code_block"],"defaultType":"p","hotkey":"Backspace"}]},"handlers":{},"key":"resetNode","type":"resetNode","inject":{},"editor":{}},{"options":{"query":{"allow":["img","hr"]},"removeNodeIfEmpty":false},"key":"selectOnBackspace","type":"selectOnBackspace","inject":{},"editor":{}},{"options":{"rules":[{"hotkey":"shift+enter"},{"hotkey":"enter","query":{"allow":["code_block","blockquote","td"]}}]},"handlers":{},"key":"softBreak","type":"softBreak","inject":{},"editor":{}},{"options":{"globalEventListener":false},"key":"tabbable","plugins":[{"key":"tabbable_element","isElement":true,"isVoid":true,"type":"tabbable_element","options":{},"inject":{},"editor":{}}],"type":"tabbable","inject":{},"editor":{}},{"key":"tabbable_element","isElement":true,"isVoid":true,"type":"tabbable_element","options":{},"inject":{},"editor":{}},{"key":"trailingBlock","options":{"type":"p","level":0},"type":"p","_thenReplaced":2,"inject":{},"editor":{}},{"key":"dragOverCursor","handlers":{},"type":"dragOverCursor","options":{},"inject":{},"editor":{}},{"isLeaf":true,"key":"comment","options":{"hotkey":["meta+shift+m","ctrl+shift+m"]},"type":"comment","inject":{},"editor":{}},{"inject":{"pluginsByKey":{"deserializeHtml":{"editor":{"insertData":{}}}}},"key":"deserializeDocx","overrideByKey":{"p":{},"h1":{},"h2":{},"h3":{},"h4":{},"h5":{},"h6":{},"img":{"editor":{"insertData":{}}}},"type":"deserializeDocx","options":{},"editor":{}},{"key":"deserializeMd","editor":{"insertData":{"format":"text/plain"}},"options":{"elementRules":{"blockquote":{},"code":{},"heading":{},"image":{},"link":{},"list":{},"listItem":{},"paragraph":{},"thematicBreak":{}},"indentList":false,"textRules":{"emphasis":{},"html":{},"inlineCode":{},"strong":{},"text":{}}},"_thenReplaced":2,"type":"deserializeMd","inject":{}},{"inject":{"pluginsByKey":{"deserializeHtml":{"editor":{"insertData":{}}}}},"key":"juice","type":"juice","options":{},"editor":{}},{"key":"slash_command","options":{"trigger":"/","triggerPreviousCharPattern":{}},"plugins":[{"component":{},"isElement":true,"isInline":true,"isVoid":true,"key":"slash_input","type":"slash_input","options":{},"inject":{},"editor":{}}],"type":"slash_command","inject":{},"editor":{}},{"component":{},"isElement":true,"isInline":true,"isVoid":true,"key":"slash_input","type":"slash_input","options":{},"inject":{},"editor":{}},{"key":"url-listener","handlers":{},"type":"url-listener","options":{},"inject":{},"editor":{}},{"key":"log_element","handlers":{},"type":"log_element","options":{},"inject":{},"editor":{}},{"component":{},"key":"url-wrapper","isElement":true,"isVoid":true,"type":"url-wrapper","options":{},"inject":{},"editor":{}},{"component":{},"key":"memorymap","isElement":true,"isVoid":true,"type":"memorymap","options":{},"inject":{},"editor":{}},{"key":"amazingButton","isElement":true,"isVoid":true,"handlers":{},"type":"amazingButton","options":{},"inject":{},"editor":{}}],"pluginsByKey":{"react":{"key":"react","type":"react","options":{},"inject":{},"editor":{}},"history":{"key":"history","type":"history","options":{},"inject":{},"editor":{}},"nodeFactory":{"key":"nodeFactory","type":"nodeFactory","options":{},"inject":{},"editor":{}},"event-editor":{"handlers":{},"key":"event-editor","type":"event-editor","options":{},"inject":{},"editor":{}},"inline-void":{"key":"inline-void","type":"inline-void","options":{},"inject":{},"editor":{}},"insertData":{"key":"insertData","type":"insertData","options":{},"inject":{},"editor":{}},"prevSelection":{"handlers":{},"key":"prevSelection","type":"prevSelection","options":{},"inject":{},"editor":{}},"deserializeHtml":{"key":"deserializeHtml","editor":{"insertData":{"format":"text/html"}},"_thenReplaced":1,"type":"deserializeHtml","options":{},"inject":{}},"deserializeAst":{"editor":{"insertData":{"format":"application/x-slate-fragment"}},"key":"deserializeAst","type":"deserializeAst","options":{},"inject":{}},"editorProtocol":{"key":"editorProtocol","type":"editorProtocol","options":{},"inject":{},"editor":{}},"p":{"deserializeHtml":{"rules":[{"validNodeName":"P"}]},"component":{},"handlers":{},"isElement":true,"key":"p","options":{"hotkey":["mod+opt+0","mod+shift+0"]},"type":"p","inject":{},"editor":{}},"heading":{"key":"heading","plugins":[{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"H1"}]},"handlers":{},"isElement":true,"key":"h1","options":{"hotkey":["mod+opt+1","mod+shift+1"]},"type":"h1","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"H2"}]},"handlers":{},"isElement":true,"key":"h2","options":{"hotkey":["mod+opt+2","mod+shift+2"]},"type":"h2","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"H3"}]},"handlers":{},"isElement":true,"key":"h3","options":{"hotkey":["mod+opt+3","mod+shift+3"]},"type":"h3","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"H4"}]},"handlers":{},"isElement":true,"key":"h4","options":{},"type":"h4","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"H5"}]},"handlers":{},"isElement":true,"key":"h5","options":{},"type":"h5","inject":{},"editor":{}},{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"H6"}]},"handlers":{},"isElement":true,"key":"h6","options":{},"type":"h6","inject":{},"editor":{}}],"options":{"levels":[1,2,3,4,5,6]},"_thenReplaced":2,"type":"heading","inject":{},"editor":{}},"h1":{"deserializeHtml":{"rules":[{"validNodeName":"H1"}]},"component":{},"handlers":{},"isElement":true,"key":"h1","options":{"hotkey":["mod+opt+1","mod+shift+1"]},"type":"h1","inject":{},"editor":{}},"h2":{"deserializeHtml":{"rules":[{"validNodeName":"H2"}]},"component":{},"handlers":{},"isElement":true,"key":"h2","options":{"hotkey":["mod+opt+2","mod+shift+2"]},"type":"h2","inject":{},"editor":{}},"h3":{"deserializeHtml":{"rules":[{"validNodeName":"H3"}]},"component":{},"handlers":{},"isElement":true,"key":"h3","options":{"hotkey":["mod+opt+3","mod+shift+3"]},"type":"h3","inject":{},"editor":{}},"h4":{"deserializeHtml":{"rules":[{"validNodeName":"H4"}]},"component":{},"handlers":{},"isElement":true,"key":"h4","options":{},"type":"h4","inject":{},"editor":{}},"h5":{"deserializeHtml":{"rules":[{"validNodeName":"H5"}]},"component":{},"handlers":{},"isElement":true,"key":"h5","options":{},"type":"h5","inject":{},"editor":{}},"h6":{"deserializeHtml":{"rules":[{"validNodeName":"H6"}]},"component":{},"handlers":{},"isElement":true,"key":"h6","options":{},"type":"h6","inject":{},"editor":{}},"blockquote":{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"BLOCKQUOTE"}]},"handlers":{},"isElement":true,"key":"blockquote","options":{"hotkey":"mod+shift+."},"type":"blockquote","inject":{},"editor":{}},"code_block":{"component":{},"key":"code_block","inject":{"pluginsByKey":{"deserializeHtml":{"editor":{"insertData":{}}}}},"deserializeHtml":{"rules":[{"validNodeName":"PRE"},{"validNodeName":"P","validStyle":{"fontFamily":"Consolas"}}]},"handlers":{},"isElement":true,"options":{"hotkey":["mod+opt+8","mod+shift+8"],"syntax":true,"syntaxPopularFirst":false},"plugins":[{"component":{},"isElement":true,"key":"code_line","type":"code_line","options":{},"inject":{},"editor":{}},{"component":{},"isLeaf":true,"key":"code_syntax","type":"code_syntax","options":{},"inject":{},"editor":{}}],"_thenReplaced":2,"type":"code_block","editor":{}},"code_line":{"component":{},"isElement":true,"key":"code_line","type":"code_line","options":{},"inject":{},"editor":{}},"code_syntax":{"component":{},"isLeaf":true,"key":"code_syntax","type":"code_syntax","options":{},"inject":{},"editor":{}},"hr":{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"HR"}]},"isElement":true,"isVoid":true,"key":"hr","type":"hr","options":{},"inject":{},"editor":{}},"a":{"component":{},"key":"a","deserializeHtml":{"rules":[{"validNodeName":"A"}]},"isElement":true,"isInline":true,"options":{"allowedSchemes":["http","https","mailto","tel"],"dangerouslySkipSanitization":false,"defaultLinkAttributes":{},"keepSelectedTextOnPaste":true,"rangeBeforeOptions":{"afterMatch":true,"matchString":" ","skipInvalid":true},"triggerFloatingLinkHotkeys":"meta+k, ctrl+k"},"_thenReplaced":2,"type":"a","inject":{},"editor":{}},"img":{"editor":{"insertData":{}},"component":{},"key":"img","deserializeHtml":{"rules":[{"validNodeName":"IMG"}]},"isElement":true,"isVoid":true,"_thenReplaced":2,"type":"img","options":{},"inject":{}},"media_embed":{"component":{},"key":"media_embed","deserializeHtml":{"rules":[{"validNodeName":"IFRAME"}]},"isElement":true,"isVoid":true,"options":{},"_thenReplaced":2,"type":"media_embed","inject":{},"editor":{}},"caption":{"options":{"pluginKeys":["img","media_embed"]},"handlers":{},"key":"caption","type":"caption","inject":{},"editor":{}},"mention":{"component":{},"isElement":true,"isInline":true,"isMarkableVoid":true,"isVoid":true,"key":"mention","options":{"trigger":"@","triggerPreviousCharPattern":{}},"plugins":[{"component":{},"isElement":true,"isInline":true,"isVoid":true,"key":"mention_input","type":"mention_input","options":{},"inject":{},"editor":{}}],"type":"mention","inject":{},"editor":{}},"mention_input":{"component":{},"isElement":true,"isInline":true,"isVoid":true,"key":"mention_input","type":"mention_input","options":{},"inject":{},"editor":{}},"table":{"component":{},"key":"table","options":{"_cellIndices":{},"enableMerging":false,"minColumnWidth":48},"deserializeHtml":{"rules":[{"validNodeName":"TABLE"}]},"handlers":{},"isElement":true,"plugins":[{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"TR"}]},"isElement":true,"key":"tr","type":"tr","options":{},"inject":{},"editor":{}},{"component":{},"isElement":true,"key":"td","_thenReplaced":3,"type":"td","options":{},"inject":{},"editor":{}},{"component":{},"isElement":true,"key":"th","_thenReplaced":3,"type":"th","options":{},"inject":{},"editor":{}}],"_thenReplaced":2,"type":"table","inject":{},"editor":{}},"tr":{"component":{},"deserializeHtml":{"rules":[{"validNodeName":"TR"}]},"isElement":true,"key":"tr","type":"tr","options":{},"inject":{},"editor":{}},"td":{"key":"td","component":{},"deserializeHtml":{"attributeNames":["rowspan","colspan"],"rules":[{"validNodeName":"TD"}]},"isElement":true,"_thenReplaced":3,"type":"td","options":{},"inject":{},"editor":{}},"th":{"key":"th","component":{},"deserializeHtml":{"attributeNames":["rowspan","colspan"],"rules":[{"validNodeName":"TH"}]},"isElement":true,"_thenReplaced":3,"type":"th","options":{},"inject":{},"editor":{}},"action_item":{"component":{},"handlers":{},"isElement":true,"key":"action_item","options":{"hotkey":["mod+opt+4","mod+shift+4"]},"type":"action_item","inject":{},"editor":{}},"excalidraw":{"component":{},"isElement":true,"isVoid":true,"key":"excalidraw","type":"excalidraw","options":{},"inject":{},"editor":{}},"bold":{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["STRONG","B"]},{"validStyle":{"fontWeight":["600","700","bold"]}}]},"handlers":{},"isLeaf":true,"key":"bold","options":{"hotkey":"mod+b"},"type":"bold","inject":{},"editor":{}},"italic":{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["EM","I"]},{"validStyle":{"fontStyle":"italic"}}]},"handlers":{},"isLeaf":true,"key":"italic","options":{"hotkey":"mod+i"},"type":"italic","inject":{},"editor":{}},"underline":{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["U"]},{"validStyle":{"textDecoration":["underline"]}}]},"handlers":{},"isLeaf":true,"key":"underline","options":{"hotkey":"mod+u"},"type":"underline","inject":{},"editor":{}},"strikethrough":{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["S","DEL","STRIKE"]},{"validStyle":{"textDecoration":"line-through"}}]},"handlers":{},"isLeaf":true,"key":"strikethrough","options":{"hotkey":"mod+shift+x"},"type":"strikethrough","inject":{},"editor":{}},"code":{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["CODE"]},{"validStyle":{"fontFamily":"Consolas"}}]},"handlers":{},"isLeaf":true,"key":"code","options":{"hotkey":"mod+e"},"type":"code","inject":{},"editor":{}},"subscript":{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["SUB"]},{"validStyle":{"verticalAlign":"sub"}}]},"handlers":{},"isLeaf":true,"key":"subscript","options":{"clear":"superscript","hotkey":"mod+,"},"type":"subscript","inject":{},"editor":{}},"superscript":{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["SUP"]},{"validStyle":{"verticalAlign":"super"}}]},"handlers":{},"isLeaf":true,"key":"superscript","options":{"clear":"subscript","hotkey":"mod+."},"type":"superscript","inject":{},"editor":{}},"color":{"key":"color","deserializeHtml":{"isLeaf":true,"rules":[{"validStyle":{"color":"*"}}]},"inject":{"props":{"defaultNodeValue":"black","nodeKey":"color"}},"_thenReplaced":2,"type":"color","options":{},"editor":{}},"backgroundColor":{"key":"backgroundColor","deserializeHtml":{"isLeaf":true,"rules":[{"validStyle":{"backgroundColor":"*"}}]},"inject":{"props":{"nodeKey":"backgroundColor"}},"_thenReplaced":2,"type":"backgroundColor","options":{},"editor":{}},"fontSize":{"key":"fontSize","deserializeHtml":{"isLeaf":true,"rules":[{"validStyle":{"fontSize":"*"}}]},"inject":{"props":{"nodeKey":"fontSize"}},"_thenReplaced":2,"type":"fontSize","options":{},"editor":{}},"highlight":{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["MARK"]}]},"handlers":{},"isLeaf":true,"key":"highlight","options":{"hotkey":"mod+shift+h"},"type":"highlight","inject":{},"editor":{}},"kbd":{"component":{},"deserializeHtml":{"rules":[{"validNodeName":["KBD"]}]},"handlers":{},"isLeaf":true,"key":"kbd","type":"kbd","options":{},"inject":{},"editor":{}},"align":{"key":"align","inject":{"props":{"validTypes":["p","h1","h2","h3"],"defaultNodeValue":"start","nodeKey":"align","styleKey":"textAlign","validNodeValues":["start","left","center","right","end","justify"]},"pluginsByKey":{"p":{"deserializeHtml":{}},"h1":{"deserializeHtml":{}},"h2":{"deserializeHtml":{}},"h3":{"deserializeHtml":{}}}},"_thenReplaced":2,"type":"align","options":{},"editor":{}},"indent":{"key":"indent","inject":{"props":{"validTypes":["p","h1","h2","h3","blockquote","code_block"],"nodeKey":"indent","styleKey":"marginLeft"}},"handlers":{},"options":{"offset":24,"unit":"px"},"_thenReplaced":2,"type":"indent","editor":{}},"listStyleType":{"key":"listStyleType","inject":{"props":{"validTypes":["p","h1","h2","h3","blockquote","code_block"]},"pluginsByKey":{"deserializeHtml":{"editor":{"insertData":{}}}}},"deserializeHtml":{"isElement":true,"rules":[{"validNodeName":"LI"}]},"handlers":{},"options":{},"_thenReplaced":2,"type":"listStyleType","editor":{}},"lineHeight":{"key":"lineHeight","inject":{"props":{"defaultNodeValue":1.5,"validNodeValues":[1,1.2,1.5,2,3],"validTypes":["p","h1","h2","h3"],"nodeKey":"lineHeight"},"pluginsByKey":{"p":{"deserializeHtml":{}},"h1":{"deserializeHtml":{}},"h2":{"deserializeHtml":{}},"h3":{"deserializeHtml":{}}}},"_thenReplaced":2,"type":"lineHeight","options":{},"editor":{}},"autoformat":{"options":{"rules":[{"mode":"block","type":"h1","match":"# "},{"mode":"block","type":"h2","match":"## "},{"mode":"block","type":"h3","match":"### "},{"mode":"block","type":"h4","match":"#### "},{"mode":"block","type":"h5","match":"##### "},{"mode":"block","type":"h6","match":"###### "},{"mode":"block","type":"blockquote","match":"> "},{"mode":"block","type":"code_block","match":"```","triggerAtBlockStart":false},{"mode":"block","type":"hr","match":["---","—-","___ "]},{"mode":"block","type":"list","match":["* ","- "]},{"mode":"block","type":"list","match":["1. ","1) "]},{"mode":"mark","type":["bold","italic"],"match":"***"},{"mode":"mark","type":["underline","italic"],"match":"__*"},{"mode":"mark","type":["underline","bold"],"match":"__**"},{"mode":"mark","type":["underline","bold","italic"],"match":"___***"},{"mode":"mark","type":"bold","match":"**"},{"mode":"mark","type":"underline","match":"__"},{"mode":"mark","type":"italic","match":"*"},{"mode":"mark","type":"italic","match":"_"},{"mode":"mark","type":"strikethrough","match":"~~"},{"mode":"mark","type":"superscript","match":"^"},{"mode":"mark","type":"subscript","match":"~"},{"mode":"mark","type":"highlight","match":"=="},{"mode":"mark","type":"highlight","match":"≡"},{"mode":"mark","type":"code","match":"`"},{"format":["“","”"],"match":"\"","mode":"text"},{"format":["‘","’"],"match":"'","mode":"text"},{"format":"—","match":"--","mode":"text"},{"format":"…","match":"...","mode":"text"},{"format":"»","match":">>","mode":"text"},{"format":"«","match":"<<","mode":"text"},{"format":"™","match":["(tm)","(TM)"],"mode":"text"},{"format":"®","match":["(r)","(R)"],"mode":"text"},{"format":"©","match":["(c)","(C)"],"mode":"text"},{"format":"™","match":"&trade;","mode":"text"},{"format":"®","match":"&reg;","mode":"text"},{"format":"©","match":"&copy;","mode":"text"},{"format":"§","match":"&sect;","mode":"text"},{"format":"→","match":"->","mode":"text"},{"format":"←","match":"<-","mode":"text"},{"format":"⇒","match":"=>","mode":"text"},{"format":"⇐","match":["<=","≤="],"mode":"text"},{"format":"≯","match":"!>","mode":"text"},{"format":"≮","match":"!<","mode":"text"},{"format":"≥","match":">=","mode":"text"},{"format":"≤","match":"<=","mode":"text"},{"format":"≱","match":"!>=","mode":"text"},{"format":"≰","match":"!<=","mode":"text"},{"format":"≠","match":"!=","mode":"text"},{"format":"≡","match":"==","mode":"text"},{"format":"≢","match":["!==","≠="],"mode":"text"},{"format":"≈","match":"~=","mode":"text"},{"format":"≉","match":"!~=","mode":"text"},{"format":"±","match":"+-","mode":"text"},{"format":"‰","match":"%%","mode":"text"},{"format":"‱","match":["%%%","‰%"],"mode":"text"},{"format":"÷","match":"//","mode":"text"},{"format":"½","match":"1/2","mode":"text"},{"format":"⅓","match":"1/3","mode":"text"},{"format":"¼","match":"1/4","mode":"text"},{"format":"⅕","match":"1/5","mode":"text"},{"format":"⅙","match":"1/6","mode":"text"},{"format":"⅐","match":"1/7","mode":"text"},{"format":"⅛","match":"1/8","mode":"text"},{"format":"⅑","match":"1/9","mode":"text"},{"format":"⅒","match":"1/10","mode":"text"},{"format":"⅔","match":"2/3","mode":"text"},{"format":"⅖","match":"2/5","mode":"text"},{"format":"¾","match":"3/4","mode":"text"},{"format":"⅗","match":"3/5","mode":"text"},{"format":"⅜","match":"3/8","mode":"text"},{"format":"⅘","match":"4/5","mode":"text"},{"format":"⅚","match":"5/6","mode":"text"},{"format":"⅝","match":"5/8","mode":"text"},{"format":"⅞","match":"7/8","mode":"text"},{"format":"°","match":"^o","mode":"text"},{"format":"⁺","match":"^+","mode":"text"},{"format":"⁻","match":"^-","mode":"text"},{"format":"₊","match":"~+","mode":"text"},{"format":"₋","match":"~-","mode":"text"},{"format":"⁰","match":"^0","mode":"text"},{"format":"¹","match":"^1","mode":"text"},{"format":"²","match":"^2","mode":"text"},{"format":"³","match":"^3","mode":"text"},{"format":"⁴","match":"^4","mode":"text"},{"format":"⁵","match":"^5","mode":"text"},{"format":"⁶","match":"^6","mode":"text"},{"format":"⁷","match":"^7","mode":"text"},{"format":"⁸","match":"^8","mode":"text"},{"format":"⁹","match":"^9","mode":"text"},{"format":"₀","match":"~0","mode":"text"},{"format":"₁","match":"~1","mode":"text"},{"format":"₂","match":"~2","mode":"text"},{"format":"₃","match":"~3","mode":"text"},{"format":"₄","match":"~4","mode":"text"},{"format":"₅","match":"~5","mode":"text"},{"format":"₆","match":"~6","mode":"text"},{"format":"₇","match":"~7","mode":"text"},{"format":"₈","match":"~8","mode":"text"},{"format":"₉","match":"~9","mode":"text"}],"enableUndoOnDelete":true},"handlers":{},"key":"autoformat","type":"autoformat","inject":{},"editor":{}},"blockSelection":{"key":"blockSelection","options":{"sizes":{"top":0,"bottom":0,"left":4,"right":4},"query":{"maxLevel":1}},"handlers":{},"inject":{},"_thenReplaced":2,"type":"blockSelection","editor":{}},"dnd":{"key":"dnd","options":{"enableScroller":true},"handlers":{},"_thenReplaced":2,"type":"dnd","inject":{},"editor":{}},"exitBreak":{"options":{"rules":[{"hotkey":"mod+enter"},{"hotkey":"mod+shift+enter","before":true},{"hotkey":"enter","query":{"start":true,"end":true,"allow":["h1","h2","h3","h4","h5","h6"]},"relative":true,"level":1}]},"handlers":{},"key":"exitBreak","type":"exitBreak","inject":{},"editor":{}},"nodeId":{"key":"nodeId","options":{"filterText":true,"idKey":"id"},"type":"nodeId","inject":{},"editor":{}},"resetNode":{"options":{"rules":[{"types":["blockquote","action_item"],"defaultType":"p","hotkey":"Enter"},{"types":["blockquote","action_item"],"defaultType":"p","hotkey":"Backspace"},{"types":["code_block"],"defaultType":"p","hotkey":"Enter"},{"types":["code_block"],"defaultType":"p","hotkey":"Backspace"}]},"handlers":{},"key":"resetNode","type":"resetNode","inject":{},"editor":{}},"selectOnBackspace":{"options":{"query":{"allow":["img","hr"]},"removeNodeIfEmpty":false},"key":"selectOnBackspace","type":"selectOnBackspace","inject":{},"editor":{}},"softBreak":{"options":{"rules":[{"hotkey":"shift+enter"},{"hotkey":"enter","query":{"allow":["code_block","blockquote","td"]}}]},"handlers":{},"key":"softBreak","type":"softBreak","inject":{},"editor":{}},"tabbable":{"options":{"globalEventListener":false},"key":"tabbable","plugins":[{"key":"tabbable_element","isElement":true,"isVoid":true,"type":"tabbable_element","options":{},"inject":{},"editor":{}}],"type":"tabbable","inject":{},"editor":{}},"tabbable_element":{"key":"tabbable_element","isElement":true,"isVoid":true,"type":"tabbable_element","options":{},"inject":{},"editor":{}},"trailingBlock":{"key":"trailingBlock","options":{"type":"p","level":0},"type":"p","_thenReplaced":2,"inject":{},"editor":{}},"dragOverCursor":{"key":"dragOverCursor","handlers":{},"type":"dragOverCursor","options":{},"inject":{},"editor":{}},"comment":{"isLeaf":true,"key":"comment","options":{"hotkey":["meta+shift+m","ctrl+shift+m"]},"type":"comment","inject":{},"editor":{}},"deserializeDocx":{"inject":{"pluginsByKey":{"deserializeHtml":{"editor":{"insertData":{}}}}},"key":"deserializeDocx","overrideByKey":{"p":{},"h1":{},"h2":{},"h3":{},"h4":{},"h5":{},"h6":{},"img":{"editor":{"insertData":{}}}},"type":"deserializeDocx","options":{},"editor":{}},"deserializeMd":{"key":"deserializeMd","editor":{"insertData":{"format":"text/plain"}},"options":{"elementRules":{"blockquote":{},"code":{},"heading":{},"image":{},"link":{},"list":{},"listItem":{},"paragraph":{},"thematicBreak":{}},"indentList":false,"textRules":{"emphasis":{},"html":{},"inlineCode":{},"strong":{},"text":{}}},"_thenReplaced":2,"type":"deserializeMd","inject":{}},"juice":{"inject":{"pluginsByKey":{"deserializeHtml":{"editor":{"insertData":{}}}}},"key":"juice","type":"juice","options":{},"editor":{}},"slash_command":{"key":"slash_command","options":{"trigger":"/","triggerPreviousCharPattern":{}},"plugins":[{"component":{},"isElement":true,"isInline":true,"isVoid":true,"key":"slash_input","type":"slash_input","options":{},"inject":{},"editor":{}}],"type":"slash_command","inject":{},"editor":{}},"slash_input":{"component":{},"isElement":true,"isInline":true,"isVoid":true,"key":"slash_input","type":"slash_input","options":{},"inject":{},"editor":{}},"url-listener":{"key":"url-listener","handlers":{},"type":"url-listener","options":{},"inject":{},"editor":{}},"log_element":{"key":"log_element","handlers":{},"type":"log_element","options":{},"inject":{},"editor":{}},"url-wrapper":{"component":{},"key":"url-wrapper","isElement":true,"isVoid":true,"type":"url-wrapper","options":{},"inject":{},"editor":{}},"memorymap":{"component":{},"key":"memorymap","isElement":true,"isVoid":true,"type":"memorymap","options":{},"inject":{},"editor":{}},"amazingButton":{"key":"amazingButton","isElement":true,"isVoid":true,"handlers":{},"type":"amazingButton","options":{},"inject":{},"editor":{}}},"history":{"undos":[{"operations":[{"type":"remove_text","path":[1,0],"offset":14,"text":"e"},{"type":"set_node","path":[1,0],"properties":{},"newProperties":{"type":"code_line"}},{"type":"insert_node","path":[2],"node":{"children":[{"text":""}],"type":"p","id":"0a93l"}}],"selectionBefore":{"anchor":{"path":[1,0],"offset":15},"focus":{"path":[1,0],"offset":15}}},{"operations":[{"type":"remove_text","path":[1,0],"offset":13,"text":"r"},{"type":"remove_text","path":[1,0],"offset":12,"text":"e"},{"type":"remove_text","path":[1,0],"offset":11,"text":"h"},{"type":"remove_text","path":[1,0],"offset":10,"text":" "},{"type":"remove_text","path":[1,0],"offset":9,"text":"k"},{"type":"remove_text","path":[1,0],"offset":8,"text":"c"},{"type":"remove_text","path":[1,0],"offset":7,"text":"o"},{"type":"remove_text","path":[1,0],"offset":6,"text":"l"},{"type":"remove_text","path":[1,0],"offset":5,"text":"b"},{"type":"remove_text","path":[1,0],"offset":4,"text":" "},{"type":"remove_text","path":[1,0],"offset":3,"text":"e"},{"type":"remove_text","path":[1,0],"offset":2,"text":"d"},{"type":"remove_text","path":[1,0],"offset":1,"text":"o"},{"type":"remove_text","path":[1,0],"offset":0,"text":"c"}],"selectionBefore":{"anchor":{"path":[1,0],"offset":14},"focus":{"path":[1,0],"offset":14}}},{"operations":[{"type":"insert_node","path":[1,1],"node":{"text":"f"}},{"type":"remove_node","path":[1,0],"node":{"text":"","type":"code_line"}}],"selectionBefore":{"anchor":{"path":[1,0],"offset":0},"focus":{"path":[1,0],"offset":0}}}],"redos":[]},"blockSelectionStore":{"get":{},"name":"selection","set":{},"store":{},"use":{},"useTracked":{}},"value":[{"id":"4jfkls","type":"p","children":[{"text":""}]},{"id":"1","type":"code_block","children":[{"text":"code block here"}]}]}

https://github.com/user-attachments/assets/fc689414-2314-4030-bd02-3a77ce21ebb5

Reproduction URL

No response

Reproduction steps

  1. Add a single element with a codeBlock on page
'use client';

import {
  Plate,
} from '@udecode/plate-common';
import { Editor } from '@/components/plate-ui/editor';
import {
  ELEMENT_CODE_BLOCK,
  unwrapCodeBlock,
} from '@udecode/plate-code-block';
import { FloatingToolbar } from './plate-ui/floating-toolbar';
import { FloatingToolbarButtons } from './plate-ui/floating-toolbar-buttons';
import { DndProvider } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend';
import { plugins } from "@/lib/plate/plate-plugins"
import { ELEMENT_PARAGRAPH } from '@udecode/plate-paragraph';

const initialValue = [
  {
    id: "4jfkls",
    type: ELEMENT_PARAGRAPH,
    children: [{ text: ""}]
  },
  {
    id: "1",
    type: ELEMENT_CODE_BLOCK,
    children: [{  text: "code block here"}]
  },
  /* {
    id: "fd7",
    type: KEY_URL_WRAPPER,
    children: [{ text: "" }]
  },
  {
    id: "5",
    type: KEY_MEMORYMAP,
    children: [{ text: "" }]
  }, */
];

export const PlateEditor = () => {
  return (
    <DndProvider backend={HTML5Backend}>
      <Plate plugins={plugins} initialValue={initialValue} onChange={(change) => console.log("change", change)}>
        <Editor />
        <FloatingToolbar>
          <FloatingToolbarButtons />
        </FloatingToolbar>
      </Plate>
    </DndProvider>
  );
};
  1. Delete all items in the code block
  2. start typing again
  3. See error

Plate version

36.0.0

Slate React version

0.102.0

Screenshots

No response

Logs

No response

Browsers

No response

Funding

Fund with Polar

remusris commented 1 month ago

I made a plugin to workaround this error. Might be useful for some of you.


  import {
    createPluginFactory,
    PlateEditor,
    TElement,
    findNode,
    getNodeString,
  } from '@udecode/plate-common';
  import { ELEMENT_CODE_BLOCK } from '@udecode/plate-code-block';
  import { ELEMENT_PARAGRAPH } from '@udecode/plate-paragraph';

  export const KEY_CODEBLOCK_BACKSPACE = 'codeBlockBackspace';

  const isCodeBlockEmpty = (editor: PlateEditor) => {
    const codeBlock = findNode(editor, {
      match: { type: ELEMENT_CODE_BLOCK },
    });
    return codeBlock ? getNodeString(codeBlock[0]).length === 0 : false;
  };

  const isSelectionAtCodeBlockStart = (editor: PlateEditor) => {
    const { selection } = editor;
    if (!selection) return false;

    const codeBlock = findNode(editor, {
      match: { type: ELEMENT_CODE_BLOCK },
      at: selection,
    });

    if (!codeBlock) return false;

    const [, path] = codeBlock;
    const start = editor.start(path);
    return editor.isStart(selection.anchor, start);
  };

  const resetEmptyCodeBlock = (editor: PlateEditor) => {
    const codeBlock = findNode(editor, {
      match: { type: ELEMENT_CODE_BLOCK },
    });

    if (codeBlock && isCodeBlockEmpty(editor)) {
      const [, path] = codeBlock;
      editor.setNodes<TElement>({ type: ELEMENT_PARAGRAPH }, { at: path });
      console.log('Empty code block reset to paragraph');
    }
  };

  // this works and it works well
  export const emptyCodeBlockListener = createPluginFactory({
    key: KEY_CODEBLOCK_BACKSPACE,
    handlers: {
      onKeyDown: (editor) => (event) => {
        if (event.key === 'Backspace') {
          const codeBlock = findNode(editor, {
            match: { type: ELEMENT_CODE_BLOCK },
          });

          if (codeBlock) {
            console.log('Backspace pressed inside a code block');

            const isEmpty = isCodeBlockEmpty(editor);
            const isAtStart = isSelectionAtCodeBlockStart(editor);

            console.log('Code block is empty:', isEmpty);
            console.log('Selection is at start:', isAtStart);

            // If we're at the start of an empty code block, prevent default
            // behavior and handle it ourselves
            if (isEmpty && isAtStart) {
              console.log('Converting empty code block to paragraph');
              event.preventDefault();
              resetEmptyCodeBlock(editor);
              return;
            }

            // If we're at the start of a non-empty code block, don't do anything special
            if (isAtStart) {
              console.log('At start of non-empty code block, no special action taken');
              return;
            }

            console.log('Backspace in code block, default behavior');

            // After the default backspace behavior, check if the code block became empty
            setTimeout(() => {
              resetEmptyCodeBlock(editor);
            }, 0);
          }
        }
      },
    },
  });
remusris commented 1 month ago

I found another permutation of this same bug. It happens when you are deleting a paragraph node going into the code block. I have a recording below. I was using the plate playground template.

https://github.com/user-attachments/assets/1fb994cd-7988-4c99-a227-10b65c7c172e

below is the error

Error: Cannot find a descendant at path [1,1] in node: {"children":[{"id":"1","type":"p","children":[{"text":"Hello, World!"}]},{"id":"2","type":"code_block","children":[{"text":"console.log(\"Hello, World!\")","type":"code_line"}]}],"operations":[{"type":"merge_node","path":[2],"position":1,"properties":{"type":"p","id":"lol76"}},{"type":"set_selection","properties":{"anchor":{"path":[1,1],"offset":0},"focus":{"path":[1,1],"offset":0}},"newProperties":{"anchor":{"path":[1,0],"offset":28},"focus":{"path":[1,0],"offset":28}}},{"type":"remove_node","path":[1,1],"node":{"text":""}}],"selection":{"anchor":{"path":[1,0],"offset":28},"focus":{"path":[1,0],"offset":28}},"marks":null,"id":"1X6_dvZ4UBU3ahJQ59Dfy","prevSelection":{"anchor":{"path":[1,1],"offset":0},"focus":{"path":[1,1],"offset":0}},"isFallback":false,"currentKeyboardEvent":null,"plate":{"set":{}},"key":0.3456349640850518,"plugins":[{"key":"react","type":"react","options":{},"inject":{},"editor":{}},{"key":"history","type":"history","options":{},"inject":{},"editor":{}},{"key":"nodeFactory","type":"nodeFactory","options":{},"inject":{},"editor":{}},{"key":"event-editor","handlers":{},"type":"event-editor","options":{},"inject":{},"editor":{}},{"key":"inline-void","type":"inline-void","options":{},"inject":{},"editor":{}},{"key":"insertData","type":"insertData","options":{},"inject":{},"editor":{}},{"key":"prevSelection","handlers":{},"type":"prevSelection","options":{},"inject":{},"editor":{}},{"key":"deserializeHtml","editor":{"insertData":{"format":"text/html"}},"_thenReplaced":1,"type":"deserializeHtml","options":{},"inject":{}},{"key":"deserializeAst","editor":{"insertData":{"format":"application/x-slate-fragment"}},"type":"deserializeAst","options":{},"inject":{}},{"key":"editorProtocol","type":"editorProtocol","options":{},"inject":{},"editor":{}},{"deserializeHtml":{"rules":[{"validNodeName":"P"}]},"component":{},"key":"p","isElement":true,"handlers":{},"options":{"hotkey":["mod+opt+0","mod+shift+0"]},"type":"p","inject":{},"editor":{}},{"key":"heading","plugins":[{"component":{},"key":"h1","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"H1"}]},"handlers":{},"options":{"hotkey":["mod+opt+1","mod+shift+1"]},"type":"h1","inject":{},"editor":{}},{"component":{},"key":"h2","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"H2"}]},"handlers":{},"options":{"hotkey":["mod+opt+2","mod+shift+2"]},"type":"h2","inject":{},"editor":{}},{"component":{},"key":"h3","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"H3"}]},"handlers":{},"options":{"hotkey":["mod+opt+3","mod+shift+3"]},"type":"h3","inject":{},"editor":{}},{"component":{},"key":"h4","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"H4"}]},"handlers":{},"options":{},"type":"h4","inject":{},"editor":{}},{"component":{},"key":"h5","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"H5"}]},"handlers":{},"options":{},"type":"h5","inject":{},"editor":{}},{"component":{},"key":"h6","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"H6"}]},"handlers":{},"options":{},"type":"h6","inject":{},"editor":{}}],"options":{"levels":6},"_thenReplaced":2,"type":"heading","inject":{},"editor":{}},{"deserializeHtml":{"rules":[{"validNodeName":"H1"}]},"component":{},"key":"h1","isElement":true,"handlers":{},"options":{"hotkey":["mod+opt+1","mod+shift+1"]},"type":"h1","inject":{},"editor":{}},{"deserializeHtml":{"rules":[{"validNodeName":"H2"}]},"component":{},"key":"h2","isElement":true,"handlers":{},"options":{"hotkey":["mod+opt+2","mod+shift+2"]},"type":"h2","inject":{},"editor":{}},{"deserializeHtml":{"rules":[{"validNodeName":"H3"}]},"component":{},"key":"h3","isElement":true,"handlers":{},"options":{"hotkey":["mod+opt+3","mod+shift+3"]},"type":"h3","inject":{},"editor":{}},{"deserializeHtml":{"rules":[{"validNodeName":"H4"}]},"component":{},"key":"h4","isElement":true,"handlers":{},"options":{},"type":"h4","inject":{},"editor":{}},{"deserializeHtml":{"rules":[{"validNodeName":"H5"}]},"component":{},"key":"h5","isElement":true,"handlers":{},"options":{},"type":"h5","inject":{},"editor":{}},{"deserializeHtml":{"rules":[{"validNodeName":"H6"}]},"component":{},"key":"h6","isElement":true,"handlers":{},"options":{},"type":"h6","inject":{},"editor":{}},{"component":{},"key":"blockquote","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"BLOCKQUOTE"}]},"handlers":{},"options":{"hotkey":"mod+shift+."},"type":"blockquote","inject":{},"editor":{}},{"component":{},"key":"code_block","inject":{"pluginsByKey":{"deserializeHtml":{"editor":{"insertData":{}}}}},"isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"PRE"},{"validNodeName":"P","validStyle":{"fontFamily":"Consolas"}}]},"handlers":{},"options":{"hotkey":["mod+opt+8","mod+shift+8"],"syntax":true,"syntaxPopularFirst":false},"plugins":[{"component":{},"key":"code_line","isElement":true,"type":"code_line","options":{},"inject":{},"editor":{}},{"component":{},"key":"code_syntax","isLeaf":true,"type":"code_syntax","options":{},"inject":{},"editor":{}}],"_thenReplaced":2,"type":"code_block","editor":{}},{"component":{},"key":"code_line","isElement":true,"type":"code_line","options":{},"inject":{},"editor":{}},{"component":{},"key":"code_syntax","isLeaf":true,"type":"code_syntax","options":{},"inject":{},"editor":{}},{"component":{},"key":"hr","isElement":true,"isVoid":true,"deserializeHtml":{"rules":[{"validNodeName":"HR"}]},"type":"hr","options":{},"inject":{},"editor":{}},{"component":{},"key":"a","deserializeHtml":{"rules":[{"validNodeName":"A"}]},"isElement":true,"isInline":true,"options":{"allowedSchemes":["http","https","mailto","tel"],"dangerouslySkipSanitization":false,"defaultLinkAttributes":{},"rangeBeforeOptions":{"matchString":" ","skipInvalid":true,"afterMatch":true},"triggerFloatingLinkHotkeys":"meta+k, ctrl+k","keepSelectedTextOnPaste":true},"_thenReplaced":2,"type":"a","inject":{},"editor":{}},{"editor":{"insertData":{}},"component":{},"key":"img","deserializeHtml":{"rules":[{"validNodeName":"IMG"}]},"isElement":true,"isVoid":true,"_thenReplaced":2,"type":"img","options":{},"inject":{}},{"component":{},"key":"media_embed","deserializeHtml":{"rules":[{"validNodeName":"IFRAME"}]},"isElement":true,"isVoid":true,"options":{},"_thenReplaced":2,"type":"media_embed","inject":{},"editor":{}},{"options":{"pluginKeys":["img","media_embed"]},"key":"caption","handlers":{},"type":"caption","inject":{},"editor":{}},{"component":{},"key":"mention","options":{"id":"mention","trigger":"@","triggerPreviousCharPattern":{}},"isElement":true,"isInline":true,"isVoid":true,"isMarkableVoid":true,"handlers":{},"plugins":[{"component":{},"key":"mention_input","isElement":true,"isInline":true,"type":"mention_input","options":{},"inject":{},"editor":{}}],"_thenReplaced":2,"type":"mention","inject":{},"editor":{}},{"component":{},"key":"mention_input","isElement":true,"isInline":true,"type":"mention_input","options":{},"inject":{},"editor":{}},{"component":{},"key":"table","isElement":true,"handlers":{},"deserializeHtml":{"rules":[{"validNodeName":"TABLE"}]},"options":{"minColumnWidth":48,"enableMerging":false,"_cellIndices":{}},"plugins":[{"component":{},"key":"tr","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"TR"}]},"type":"tr","options":{},"inject":{},"editor":{}},{"component":{},"key":"td","isElement":true,"deserializeHtml":{"attributeNames":["rowspan","colspan"],"rules":[{"validNodeName":"TD"}]},"type":"td","options":{},"inject":{},"editor":{}},{"component":{},"key":"th","isElement":true,"deserializeHtml":{"attributeNames":["rowspan","colspan"],"rules":[{"validNodeName":"TH"}]},"type":"th","options":{},"inject":{},"editor":{}}],"type":"table","inject":{},"editor":{}},{"component":{},"key":"tr","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"TR"}]},"type":"tr","options":{},"inject":{},"editor":{}},{"component":{},"key":"td","isElement":true,"deserializeHtml":{"attributeNames":["rowspan","colspan"],"rules":[{"validNodeName":"TD"}]},"type":"td","options":{},"inject":{},"editor":{}},{"component":{},"key":"th","isElement":true,"deserializeHtml":{"attributeNames":["rowspan","colspan"],"rules":[{"validNodeName":"TH"}]},"type":"th","options":{},"inject":{},"editor":{}},{"component":{},"key":"action_item","isElement":true,"handlers":{},"options":{"hotkey":["mod+opt+4","mod+shift+4"]},"type":"action_item","inject":{},"editor":{}},{"component":{},"key":"excalidraw","isElement":true,"isVoid":true,"type":"excalidraw","options":{},"inject":{},"editor":{}},{"component":{},"key":"bold","isLeaf":true,"deserializeHtml":{"rules":[{"validNodeName":["STRONG","B"]},{"validStyle":{"fontWeight":["600","700","bold"]}}]},"handlers":{},"options":{"hotkey":"mod+b"},"type":"bold","inject":{},"editor":{}},{"component":{},"key":"italic","isLeaf":true,"handlers":{},"options":{"hotkey":"mod+i"},"deserializeHtml":{"rules":[{"validNodeName":["EM","I"]},{"validStyle":{"fontStyle":"italic"}}]},"type":"italic","inject":{},"editor":{}},{"component":{},"key":"underline","isLeaf":true,"handlers":{},"options":{"hotkey":"mod+u"},"deserializeHtml":{"rules":[{"validNodeName":["U"]},{"validStyle":{"textDecoration":["underline"]}}]},"type":"underline","inject":{},"editor":{}},{"component":{},"key":"strikethrough","isLeaf":true,"handlers":{},"options":{"hotkey":"mod+shift+x"},"deserializeHtml":{"rules":[{"validNodeName":["S","DEL","STRIKE"]},{"validStyle":{"textDecoration":"line-through"}}]},"type":"strikethrough","inject":{},"editor":{}},{"component":{},"key":"code","isLeaf":true,"deserializeHtml":{"rules":[{"validNodeName":["CODE"]},{"validStyle":{"fontFamily":"Consolas"}}]},"handlers":{},"options":{"hotkey":"mod+e"},"type":"code","inject":{},"editor":{}},{"component":{},"key":"subscript","isLeaf":true,"handlers":{},"options":{"hotkey":"mod+,","clear":"superscript"},"deserializeHtml":{"rules":[{"validNodeName":["SUB"]},{"validStyle":{"verticalAlign":"sub"}}]},"type":"subscript","inject":{},"editor":{}},{"component":{},"key":"superscript","isLeaf":true,"handlers":{},"options":{"hotkey":"mod+.","clear":"subscript"},"deserializeHtml":{"rules":[{"validNodeName":["SUP"]},{"validStyle":{"verticalAlign":"super"}}]},"type":"superscript","inject":{},"editor":{}},{"key":"color","deserializeHtml":{"isLeaf":true,"rules":[{"validStyle":{"color":"*"}}]},"inject":{"props":{"nodeKey":"color","defaultNodeValue":"black"}},"_thenReplaced":2,"type":"color","options":{},"editor":{}},{"key":"backgroundColor","deserializeHtml":{"isLeaf":true,"rules":[{"validStyle":{"backgroundColor":"*"}}]},"inject":{"props":{"nodeKey":"backgroundColor"}},"_thenReplaced":2,"type":"backgroundColor","options":{},"editor":{}},{"key":"fontSize","deserializeHtml":{"isLeaf":true,"rules":[{"validStyle":{"fontSize":"*"}}]},"inject":{"props":{"nodeKey":"fontSize"}},"_thenReplaced":2,"type":"fontSize","options":{},"editor":{}},{"component":{},"key":"highlight","isLeaf":true,"handlers":{},"deserializeHtml":{"rules":[{"validNodeName":["MARK"]}]},"options":{"hotkey":"mod+shift+h"},"type":"highlight","inject":{},"editor":{}},{"component":{},"key":"kbd","isLeaf":true,"handlers":{},"deserializeHtml":{"rules":[{"validNodeName":["KBD"]}]},"type":"kbd","options":{},"inject":{},"editor":{}},{"key":"align","inject":{"props":{"validTypes":["p","h1","h2","h3"],"nodeKey":"align","defaultNodeValue":"start","styleKey":"textAlign","validNodeValues":["start","left","center","right","end","justify"]},"pluginsByKey":{"p":{"deserializeHtml":{}},"h1":{"deserializeHtml":{}},"h2":{"deserializeHtml":{}},"h3":{"deserializeHtml":{}}}},"_thenReplaced":2,"type":"align","options":{},"editor":{}},{"key":"indent","inject":{"props":{"validTypes":["p","h1","h2","h3","blockquote","code_block"],"nodeKey":"indent","styleKey":"marginLeft"}},"handlers":{},"options":{"offset":24,"unit":"px"},"_thenReplaced":2,"type":"indent","editor":{}},{"key":"listStyleType","inject":{"props":{"validTypes":["p","h1","h2","h3","blockquote","code_block"]},"pluginsByKey":{"deserializeHtml":{"editor":{"insertData":{}}}}},"deserializeHtml":{"isElement":true,"rules":[{"validNodeName":"LI"}]},"handlers":{},"options":{},"_thenReplaced":2,"type":"listStyleType","editor":{}},{"key":"lineHeight","inject":{"props":{"defaultNodeValue":1.5,"validNodeValues":[1,1.2,1.5,2,3],"validTypes":["p","h1","h2","h3"],"nodeKey":"lineHeight"},"pluginsByKey":{"p":{"deserializeHtml":{}},"h1":{"deserializeHtml":{}},"h2":{"deserializeHtml":{}},"h3":{"deserializeHtml":{}}}},"_thenReplaced":2,"type":"lineHeight","options":{},"editor":{}},{"options":{"rules":[{"mode":"block","type":"h1","match":"# "},{"mode":"block","type":"h2","match":"## "},{"mode":"block","type":"h3","match":"### "},{"mode":"block","type":"h4","match":"#### "},{"mode":"block","type":"h5","match":"##### "},{"mode":"block","type":"h6","match":"###### "},{"mode":"block","type":"blockquote","match":"> "},{"mode":"block","type":"code_block","match":"```","triggerAtBlockStart":false},{"mode":"block","type":"hr","match":["---","—-","___ "]},{"mode":"block","type":"list","match":["* ","- "]},{"mode":"block","type":"list","match":["1. ","1) "]},{"mode":"mark","type":["bold","italic"],"match":"***"},{"mode":"mark","type":["underline","italic"],"match":"__*"},{"mode":"mark","type":["underline","bold"],"match":"__**"},{"mode":"mark","type":["underline","bold","italic"],"match":"___***"},{"mode":"mark","type":"bold","match":"**"},{"mode":"mark","type":"underline","match":"__"},{"mode":"mark","type":"italic","match":"*"},{"mode":"mark","type":"italic","match":"_"},{"mode":"mark","type":"strikethrough","match":"~~"},{"mode":"mark","type":"superscript","match":"^"},{"mode":"mark","type":"subscript","match":"~"},{"mode":"mark","type":"highlight","match":"=="},{"mode":"mark","type":"highlight","match":"≡"},{"mode":"mark","type":"code","match":"`"},{"mode":"text","match":"\"","format":["“","”"]},{"mode":"text","match":"'","format":["‘","’"]},{"mode":"text","match":"--","format":"—"},{"mode":"text","match":"...","format":"…"},{"mode":"text","match":">>","format":"»"},{"mode":"text","match":"<<","format":"«"},{"mode":"text","match":["(tm)","(TM)"],"format":"™"},{"mode":"text","match":["(r)","(R)"],"format":"®"},{"mode":"text","match":["(c)","(C)"],"format":"©"},{"mode":"text","match":"&trade;","format":"™"},{"mode":"text","match":"&reg;","format":"®"},{"mode":"text","match":"&copy;","format":"©"},{"mode":"text","match":"&sect;","format":"§"},{"mode":"text","match":"->","format":"→"},{"mode":"text","match":"<-","format":"←"},{"mode":"text","match":"=>","format":"⇒"},{"mode":"text","match":["<=","≤="],"format":"⇐"},{"mode":"text","match":"!>","format":"≯"},{"mode":"text","match":"!<","format":"≮"},{"mode":"text","match":">=","format":"≥"},{"mode":"text","match":"<=","format":"≤"},{"mode":"text","match":"!>=","format":"≱"},{"mode":"text","match":"!<=","format":"≰"},{"mode":"text","match":"!=","format":"≠"},{"mode":"text","match":"==","format":"≡"},{"mode":"text","match":["!==","≠="],"format":"≢"},{"mode":"text","match":"~=","format":"≈"},{"mode":"text","match":"!~=","format":"≉"},{"mode":"text","match":"+-","format":"±"},{"mode":"text","match":"%%","format":"‰"},{"mode":"text","match":["%%%","‰%"],"format":"‱"},{"mode":"text","match":"//","format":"÷"},{"mode":"text","match":"1/2","format":"½"},{"mode":"text","match":"1/3","format":"⅓"},{"mode":"text","match":"1/4","format":"¼"},{"mode":"text","match":"1/5","format":"⅕"},{"mode":"text","match":"1/6","format":"⅙"},{"mode":"text","match":"1/7","format":"⅐"},{"mode":"text","match":"1/8","format":"⅛"},{"mode":"text","match":"1/9","format":"⅑"},{"mode":"text","match":"1/10","format":"⅒"},{"mode":"text","match":"2/3","format":"⅔"},{"mode":"text","match":"2/5","format":"⅖"},{"mode":"text","match":"3/4","format":"¾"},{"mode":"text","match":"3/5","format":"⅗"},{"mode":"text","match":"3/8","format":"⅜"},{"mode":"text","match":"4/5","format":"⅘"},{"mode":"text","match":"5/6","format":"⅚"},{"mode":"text","match":"5/8","format":"⅝"},{"mode":"text","match":"7/8","format":"⅞"},{"mode":"text","match":"^o","format":"°"},{"mode":"text","match":"^+","format":"⁺"},{"mode":"text","match":"^-","format":"⁻"},{"mode":"text","match":"~+","format":"₊"},{"mode":"text","match":"~-","format":"₋"},{"mode":"text","match":"^0","format":"⁰"},{"mode":"text","match":"^1","format":"¹"},{"mode":"text","match":"^2","format":"²"},{"mode":"text","match":"^3","format":"³"},{"mode":"text","match":"^4","format":"⁴"},{"mode":"text","match":"^5","format":"⁵"},{"mode":"text","match":"^6","format":"⁶"},{"mode":"text","match":"^7","format":"⁷"},{"mode":"text","match":"^8","format":"⁸"},{"mode":"text","match":"^9","format":"⁹"},{"mode":"text","match":"~0","format":"₀"},{"mode":"text","match":"~1","format":"₁"},{"mode":"text","match":"~2","format":"₂"},{"mode":"text","match":"~3","format":"₃"},{"mode":"text","match":"~4","format":"₄"},{"mode":"text","match":"~5","format":"₅"},{"mode":"text","match":"~6","format":"₆"},{"mode":"text","match":"~7","format":"₇"},{"mode":"text","match":"~8","format":"₈"},{"mode":"text","match":"~9","format":"₉"}],"enableUndoOnDelete":true},"key":"autoformat","handlers":{},"type":"autoformat","inject":{},"editor":{}},{"key":"blockSelection","options":{"sizes":{"top":0,"bottom":0,"left":4,"right":4},"query":{"maxLevel":1}},"inject":{},"handlers":{},"_thenReplaced":2,"type":"blockSelection","editor":{}},{"key":"combobox","handlers":{},"type":"combobox","options":{},"inject":{},"editor":{}},{"key":"dnd","options":{"enableScroller":true},"handlers":{},"_thenReplaced":2,"type":"dnd","inject":{},"editor":{}},{"key":"emoji","options":{"id":"emoji","trigger":":","emojiTriggeringController":{"options":{"trigger":":","limitTriggeringChars":2},"_isTriggering":false,"_hasTriggeringMark":false,"text":""}},"_thenReplaced":2,"type":"emoji","inject":{},"editor":{}},{"options":{"rules":[{"hotkey":"mod+enter"},{"hotkey":"mod+shift+enter","before":true},{"hotkey":"enter","query":{"start":true,"end":true,"allow":["h1","h2","h3","h4","h5","h6"]},"relative":true,"level":1}]},"key":"exitBreak","handlers":{},"type":"exitBreak","inject":{},"editor":{}},{"key":"nodeId","options":{"idKey":"id","filterText":true},"type":"nodeId","inject":{},"editor":{}},{"options":{"rules":[{"types":["blockquote","action_item"],"defaultType":"p","hotkey":"Enter"},{"types":["blockquote","action_item"],"defaultType":"p","hotkey":"Backspace"},{"types":["code_block"],"defaultType":"p","hotkey":"Enter"},{"types":["code_block"],"defaultType":"p","hotkey":"Backspace"}]},"key":"resetNode","handlers":{},"type":"resetNode","inject":{},"editor":{}},{"options":{"query":{"allow":["img","hr"]},"removeNodeIfEmpty":false},"key":"selectOnBackspace","type":"selectOnBackspace","inject":{},"editor":{}},{"options":{"rules":[{"hotkey":"shift+enter"},{"hotkey":"enter","query":{"allow":["code_block","blockquote","td"]}}]},"key":"softBreak","handlers":{},"type":"softBreak","inject":{},"editor":{}},{"options":{"globalEventListener":false},"key":"tabbable","plugins":[{"key":"tabbable_element","isElement":true,"isVoid":true,"type":"tabbable_element","options":{},"inject":{},"editor":{}}],"type":"tabbable","inject":{},"editor":{}},{"key":"tabbable_element","isElement":true,"isVoid":true,"type":"tabbable_element","options":{},"inject":{},"editor":{}},{"key":"trailingBlock","options":{"type":"p","level":0},"type":"p","_thenReplaced":2,"inject":{},"editor":{}},{"key":"dragOverCursor","handlers":{},"type":"dragOverCursor","options":{},"inject":{},"editor":{}},{"key":"comment","isLeaf":true,"options":{"hotkey":["meta+shift+m","ctrl+shift+m"]},"type":"comment","inject":{},"editor":{}},{"key":"deserializeDocx","inject":{"pluginsByKey":{"deserializeHtml":{"editor":{"insertData":{}}}}},"overrideByKey":{"p":{},"h1":{},"h2":{},"h3":{},"h4":{},"h5":{},"h6":{},"img":{"editor":{"insertData":{}}}},"type":"deserializeDocx","options":{},"editor":{}},{"key":"deserializeMd","editor":{"insertData":{"format":"text/plain"}},"options":{"elementRules":{"heading":{},"list":{},"listItem":{},"paragraph":{},"link":{},"image":{},"blockquote":{},"code":{},"thematicBreak":{}},"textRules":{"text":{},"emphasis":{},"strong":{},"inlineCode":{},"html":{}},"indentList":false},"_thenReplaced":2,"type":"deserializeMd","inject":{}},{"key":"juice","inject":{"pluginsByKey":{"deserializeHtml":{"editor":{"insertData":{}}}}},"type":"juice","options":{},"editor":{}}],"pluginsByKey":{"react":{"key":"react","type":"react","options":{},"inject":{},"editor":{}},"history":{"key":"history","type":"history","options":{},"inject":{},"editor":{}},"nodeFactory":{"key":"nodeFactory","type":"nodeFactory","options":{},"inject":{},"editor":{}},"event-editor":{"key":"event-editor","handlers":{},"type":"event-editor","options":{},"inject":{},"editor":{}},"inline-void":{"key":"inline-void","type":"inline-void","options":{},"inject":{},"editor":{}},"insertData":{"key":"insertData","type":"insertData","options":{},"inject":{},"editor":{}},"prevSelection":{"key":"prevSelection","handlers":{},"type":"prevSelection","options":{},"inject":{},"editor":{}},"deserializeHtml":{"key":"deserializeHtml","editor":{"insertData":{"format":"text/html"}},"_thenReplaced":1,"type":"deserializeHtml","options":{},"inject":{}},"deserializeAst":{"key":"deserializeAst","editor":{"insertData":{"format":"application/x-slate-fragment"}},"type":"deserializeAst","options":{},"inject":{}},"editorProtocol":{"key":"editorProtocol","type":"editorProtocol","options":{},"inject":{},"editor":{}},"p":{"deserializeHtml":{"rules":[{"validNodeName":"P"}]},"component":{},"key":"p","isElement":true,"handlers":{},"options":{"hotkey":["mod+opt+0","mod+shift+0"]},"type":"p","inject":{},"editor":{}},"heading":{"key":"heading","plugins":[{"component":{},"key":"h1","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"H1"}]},"handlers":{},"options":{"hotkey":["mod+opt+1","mod+shift+1"]},"type":"h1","inject":{},"editor":{}},{"component":{},"key":"h2","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"H2"}]},"handlers":{},"options":{"hotkey":["mod+opt+2","mod+shift+2"]},"type":"h2","inject":{},"editor":{}},{"component":{},"key":"h3","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"H3"}]},"handlers":{},"options":{"hotkey":["mod+opt+3","mod+shift+3"]},"type":"h3","inject":{},"editor":{}},{"component":{},"key":"h4","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"H4"}]},"handlers":{},"options":{},"type":"h4","inject":{},"editor":{}},{"component":{},"key":"h5","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"H5"}]},"handlers":{},"options":{},"type":"h5","inject":{},"editor":{}},{"component":{},"key":"h6","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"H6"}]},"handlers":{},"options":{},"type":"h6","inject":{},"editor":{}}],"options":{"levels":6},"_thenReplaced":2,"type":"heading","inject":{},"editor":{}},"h1":{"deserializeHtml":{"rules":[{"validNodeName":"H1"}]},"component":{},"key":"h1","isElement":true,"handlers":{},"options":{"hotkey":["mod+opt+1","mod+shift+1"]},"type":"h1","inject":{},"editor":{}},"h2":{"deserializeHtml":{"rules":[{"validNodeName":"H2"}]},"component":{},"key":"h2","isElement":true,"handlers":{},"options":{"hotkey":["mod+opt+2","mod+shift+2"]},"type":"h2","inject":{},"editor":{}},"h3":{"deserializeHtml":{"rules":[{"validNodeName":"H3"}]},"component":{},"key":"h3","isElement":true,"handlers":{},"options":{"hotkey":["mod+opt+3","mod+shift+3"]},"type":"h3","inject":{},"editor":{}},"h4":{"deserializeHtml":{"rules":[{"validNodeName":"H4"}]},"component":{},"key":"h4","isElement":true,"handlers":{},"options":{},"type":"h4","inject":{},"editor":{}},"h5":{"deserializeHtml":{"rules":[{"validNodeName":"H5"}]},"component":{},"key":"h5","isElement":true,"handlers":{},"options":{},"type":"h5","inject":{},"editor":{}},"h6":{"deserializeHtml":{"rules":[{"validNodeName":"H6"}]},"component":{},"key":"h6","isElement":true,"handlers":{},"options":{},"type":"h6","inject":{},"editor":{}},"blockquote":{"component":{},"key":"blockquote","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"BLOCKQUOTE"}]},"handlers":{},"options":{"hotkey":"mod+shift+."},"type":"blockquote","inject":{},"editor":{}},"code_block":{"component":{},"key":"code_block","inject":{"pluginsByKey":{"deserializeHtml":{"editor":{"insertData":{}}}}},"isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"PRE"},{"validNodeName":"P","validStyle":{"fontFamily":"Consolas"}}]},"handlers":{},"options":{"hotkey":["mod+opt+8","mod+shift+8"],"syntax":true,"syntaxPopularFirst":false},"plugins":[{"component":{},"key":"code_line","isElement":true,"type":"code_line","options":{},"inject":{},"editor":{}},{"component":{},"key":"code_syntax","isLeaf":true,"type":"code_syntax","options":{},"inject":{},"editor":{}}],"_thenReplaced":2,"type":"code_block","editor":{}},"code_line":{"component":{},"key":"code_line","isElement":true,"type":"code_line","options":{},"inject":{},"editor":{}},"code_syntax":{"component":{},"key":"code_syntax","isLeaf":true,"type":"code_syntax","options":{},"inject":{},"editor":{}},"hr":{"component":{},"key":"hr","isElement":true,"isVoid":true,"deserializeHtml":{"rules":[{"validNodeName":"HR"}]},"type":"hr","options":{},"inject":{},"editor":{}},"a":{"component":{},"key":"a","deserializeHtml":{"rules":[{"validNodeName":"A"}]},"isElement":true,"isInline":true,"options":{"allowedSchemes":["http","https","mailto","tel"],"dangerouslySkipSanitization":false,"defaultLinkAttributes":{},"rangeBeforeOptions":{"matchString":" ","skipInvalid":true,"afterMatch":true},"triggerFloatingLinkHotkeys":"meta+k, ctrl+k","keepSelectedTextOnPaste":true},"_thenReplaced":2,"type":"a","inject":{},"editor":{}},"img":{"editor":{"insertData":{}},"component":{},"key":"img","deserializeHtml":{"rules":[{"validNodeName":"IMG"}]},"isElement":true,"isVoid":true,"_thenReplaced":2,"type":"img","options":{},"inject":{}},"media_embed":{"component":{},"key":"media_embed","deserializeHtml":{"rules":[{"validNodeName":"IFRAME"}]},"isElement":true,"isVoid":true,"options":{},"_thenReplaced":2,"type":"media_embed","inject":{},"editor":{}},"caption":{"options":{"pluginKeys":["img","media_embed"]},"key":"caption","handlers":{},"type":"caption","inject":{},"editor":{}},"mention":{"component":{},"key":"mention","options":{"id":"mention","trigger":"@","triggerPreviousCharPattern":{}},"isElement":true,"isInline":true,"isVoid":true,"isMarkableVoid":true,"handlers":{},"plugins":[{"component":{},"key":"mention_input","isElement":true,"isInline":true,"type":"mention_input","options":{},"inject":{},"editor":{}}],"_thenReplaced":2,"type":"mention","inject":{},"editor":{}},"mention_input":{"component":{},"key":"mention_input","isElement":true,"isInline":true,"type":"mention_input","options":{},"inject":{},"editor":{}},"table":{"component":{},"key":"table","isElement":true,"handlers":{},"deserializeHtml":{"rules":[{"validNodeName":"TABLE"}]},"options":{"minColumnWidth":48,"enableMerging":false,"_cellIndices":{}},"plugins":[{"component":{},"key":"tr","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"TR"}]},"type":"tr","options":{},"inject":{},"editor":{}},{"component":{},"key":"td","isElement":true,"deserializeHtml":{"attributeNames":["rowspan","colspan"],"rules":[{"validNodeName":"TD"}]},"type":"td","options":{},"inject":{},"editor":{}},{"component":{},"key":"th","isElement":true,"deserializeHtml":{"attributeNames":["rowspan","colspan"],"rules":[{"validNodeName":"TH"}]},"type":"th","options":{},"inject":{},"editor":{}}],"type":"table","inject":{},"editor":{}},"tr":{"component":{},"key":"tr","isElement":true,"deserializeHtml":{"rules":[{"validNodeName":"TR"}]},"type":"tr","options":{},"inject":{},"editor":{}},"td":{"component":{},"key":"td","isElement":true,"deserializeHtml":{"attributeNames":["rowspan","colspan"],"rules":[{"validNodeName":"TD"}]},"type":"td","options":{},"inject":{},"editor":{}},"th":{"component":{},"key":"th","isElement":true,"deserializeHtml":{"attributeNames":["rowspan","colspan"],"rules":[{"validNodeName":"TH"}]},"type":"th","options":{},"inject":{},"editor":{}},"action_item":{"component":{},"key":"action_item","isElement":true,"handlers":{},"options":{"hotkey":["mod+opt+4","mod+shift+4"]},"type":"action_item","inject":{},"editor":{}},"excalidraw":{"component":{},"key":"excalidraw","isElement":true,"isVoid":true,"type":"excalidraw","options":{},"inject":{},"editor":{}},"bold":{"component":{},"key":"bold","isLeaf":true,"deserializeHtml":{"rules":[{"validNodeName":["STRONG","B"]},{"validStyle":{"fontWeight":["600","700","bold"]}}]},"handlers":{},"options":{"hotkey":"mod+b"},"type":"bold","inject":{},"editor":{}},"italic":{"component":{},"key":"italic","isLeaf":true,"handlers":{},"options":{"hotkey":"mod+i"},"deserializeHtml":{"rules":[{"validNodeName":["EM","I"]},{"validStyle":{"fontStyle":"italic"}}]},"type":"italic","inject":{},"editor":{}},"underline":{"component":{},"key":"underline","isLeaf":true,"handlers":{},"options":{"hotkey":"mod+u"},"deserializeHtml":{"rules":[{"validNodeName":["U"]},{"validStyle":{"textDecoration":["underline"]}}]},"type":"underline","inject":{},"editor":{}},"strikethrough":{"component":{},"key":"strikethrough","isLeaf":true,"handlers":{},"options":{"hotkey":"mod+shift+x"},"deserializeHtml":{"rules":[{"validNodeName":["S","DEL","STRIKE"]},{"validStyle":{"textDecoration":"line-through"}}]},"type":"strikethrough","inject":{},"editor":{}},"code":{"component":{},"key":"code","isLeaf":true,"deserializeHtml":{"rules":[{"validNodeName":["CODE"]},{"validStyle":{"fontFamily":"Consolas"}}]},"handlers":{},"options":{"hotkey":"mod+e"},"type":"code","inject":{},"editor":{}},"subscript":{"component":{},"key":"subscript","isLeaf":true,"handlers":{},"options":{"hotkey":"mod+,","clear":"superscript"},"deserializeHtml":{"rules":[{"validNodeName":["SUB"]},{"validStyle":{"verticalAlign":"sub"}}]},"type":"subscript","inject":{},"editor":{}},"superscript":{"component":{},"key":"superscript","isLeaf":true,"handlers":{},"options":{"hotkey":"mod+.","clear":"subscript"},"deserializeHtml":{"rules":[{"validNodeName":["SUP"]},{"validStyle":{"verticalAlign":"super"}}]},"type":"superscript","inject":{},"editor":{}},"color":{"key":"color","deserializeHtml":{"isLeaf":true,"rules":[{"validStyle":{"color":"*"}}]},"inject":{"props":{"nodeKey":"color","defaultNodeValue":"black"}},"_thenReplaced":2,"type":"color","options":{},"editor":{}},"backgroundColor":{"key":"backgroundColor","deserializeHtml":{"isLeaf":true,"rules":[{"validStyle":{"backgroundColor":"*"}}]},"inject":{"props":{"nodeKey":"backgroundColor"}},"_thenReplaced":2,"type":"backgroundColor","options":{},"editor":{}},"fontSize":{"key":"fontSize","deserializeHtml":{"isLeaf":true,"rules":[{"validStyle":{"fontSize":"*"}}]},"inject":{"props":{"nodeKey":"fontSize"}},"_thenReplaced":2,"type":"fontSize","options":{},"editor":{}},"highlight":{"component":{},"key":"highlight","isLeaf":true,"handlers":{},"deserializeHtml":{"rules":[{"validNodeName":["MARK"]}]},"options":{"hotkey":"mod+shift+h"},"type":"highlight","inject":{},"editor":{}},"kbd":{"component":{},"key":"kbd","isLeaf":true,"handlers":{},"deserializeHtml":{"rules":[{"validNodeName":["KBD"]}]},"type":"kbd","options":{},"inject":{},"editor":{}},"align":{"key":"align","inject":{"props":{"validTypes":["p","h1","h2","h3"],"nodeKey":"align","defaultNodeValue":"start","styleKey":"textAlign","validNodeValues":["start","left","center","right","end","justify"]},"pluginsByKey":{"p":{"deserializeHtml":{}},"h1":{"deserializeHtml":{}},"h2":{"deserializeHtml":{}},"h3":{"deserializeHtml":{}}}},"_thenReplaced":2,"type":"align","options":{},"editor":{}},"indent":{"key":"indent","inject":{"props":{"validTypes":["p","h1","h2","h3","blockquote","code_block"],"nodeKey":"indent","styleKey":"marginLeft"}},"handlers":{},"options":{"offset":24,"unit":"px"},"_thenReplaced":2,"type":"indent","editor":{}},"listStyleType":{"key":"listStyleType","inject":{"props":{"validTypes":["p","h1","h2","h3","blockquote","code_block"]},"pluginsByKey":{"deserializeHtml":{"editor":{"insertData":{}}}}},"deserializeHtml":{"isElement":true,"rules":[{"validNodeName":"LI"}]},"handlers":{},"options":{},"_thenReplaced":2,"type":"listStyleType","editor":{}},"lineHeight":{"key":"lineHeight","inject":{"props":{"defaultNodeValue":1.5,"validNodeValues":[1,1.2,1.5,2,3],"validTypes":["p","h1","h2","h3"],"nodeKey":"lineHeight"},"pluginsByKey":{"p":{"deserializeHtml":{}},"h1":{"deserializeHtml":{}},"h2":{"deserializeHtml":{}},"h3":{"deserializeHtml":{}}}},"_thenReplaced":2,"type":"lineHeight","options":{},"editor":{}},"autoformat":{"options":{"rules":[{"mode":"block","type":"h1","match":"# "},{"mode":"block","type":"h2","match":"## "},{"mode":"block","type":"h3","match":"### "},{"mode":"block","type":"h4","match":"#### "},{"mode":"block","type":"h5","match":"##### "},{"mode":"block","type":"h6","match":"###### "},{"mode":"block","type":"blockquote","match":"> "},{"mode":"block","type":"code_block","match":"```","triggerAtBlockStart":false},{"mode":"block","type":"hr","match":["---","—-","___ "]},{"mode":"block","type":"list","match":["* ","- "]},{"mode":"block","type":"list","match":["1. ","1) "]},{"mode":"mark","type":["bold","italic"],"match":"***"},{"mode":"mark","type":["underline","italic"],"match":"__*"},{"mode":"mark","type":["underline","bold"],"match":"__**"},{"mode":"mark","type":["underline","bold","italic"],"match":"___***"},{"mode":"mark","type":"bold","match":"**"},{"mode":"mark","type":"underline","match":"__"},{"mode":"mark","type":"italic","match":"*"},{"mode":"mark","type":"italic","match":"_"},{"mode":"mark","type":"strikethrough","match":"~~"},{"mode":"mark","type":"superscript","match":"^"},{"mode":"mark","type":"subscript","match":"~"},{"mode":"mark","type":"highlight","match":"=="},{"mode":"mark","type":"highlight","match":"≡"},{"mode":"mark","type":"code","match":"`"},{"mode":"text","match":"\"","format":["“","”"]},{"mode":"text","match":"'","format":["‘","’"]},{"mode":"text","match":"--","format":"—"},{"mode":"text","match":"...","format":"…"},{"mode":"text","match":">>","format":"»"},{"mode":"text","match":"<<","format":"«"},{"mode":"text","match":["(tm)","(TM)"],"format":"™"},{"mode":"text","match":["(r)","(R)"],"format":"®"},{"mode":"text","match":["(c)","(C)"],"format":"©"},{"mode":"text","match":"&trade;","format":"™"},{"mode":"text","match":"&reg;","format":"®"},{"mode":"text","match":"&copy;","format":"©"},{"mode":"text","match":"&sect;","format":"§"},{"mode":"text","match":"->","format":"→"},{"mode":"text","match":"<-","format":"←"},{"mode":"text","match":"=>","format":"⇒"},{"mode":"text","match":["<=","≤="],"format":"⇐"},{"mode":"text","match":"!>","format":"≯"},{"mode":"text","match":"!<","format":"≮"},{"mode":"text","match":">=","format":"≥"},{"mode":"text","match":"<=","format":"≤"},{"mode":"text","match":"!>=","format":"≱"},{"mode":"text","match":"!<=","format":"≰"},{"mode":"text","match":"!=","format":"≠"},{"mode":"text","match":"==","format":"≡"},{"mode":"text","match":["!==","≠="],"format":"≢"},{"mode":"text","match":"~=","format":"≈"},{"mode":"text","match":"!~=","format":"≉"},{"mode":"text","match":"+-","format":"±"},{"mode":"text","match":"%%","format":"‰"},{"mode":"text","match":["%%%","‰%"],"format":"‱"},{"mode":"text","match":"//","format":"÷"},{"mode":"text","match":"1/2","format":"½"},{"mode":"text","match":"1/3","format":"⅓"},{"mode":"text","match":"1/4","format":"¼"},{"mode":"text","match":"1/5","format":"⅕"},{"mode":"text","match":"1/6","format":"⅙"},{"mode":"text","match":"1/7","format":"⅐"},{"mode":"text","match":"1/8","format":"⅛"},{"mode":"text","match":"1/9","format":"⅑"},{"mode":"text","match":"1/10","format":"⅒"},{"mode":"text","match":"2/3","format":"⅔"},{"mode":"text","match":"2/5","format":"⅖"},{"mode":"text","match":"3/4","format":"¾"},{"mode":"text","match":"3/5","format":"⅗"},{"mode":"text","match":"3/8","format":"⅜"},{"mode":"text","match":"4/5","format":"⅘"},{"mode":"text","match":"5/6","format":"⅚"},{"mode":"text","match":"5/8","format":"⅝"},{"mode":"text","match":"7/8","format":"⅞"},{"mode":"text","match":"^o","format":"°"},{"mode":"text","match":"^+","format":"⁺"},{"mode":"text","match":"^-","format":"⁻"},{"mode":"text","match":"~+","format":"₊"},{"mode":"text","match":"~-","format":"₋"},{"mode":"text","match":"^0","format":"⁰"},{"mode":"text","match":"^1","format":"¹"},{"mode":"text","match":"^2","format":"²"},{"mode":"text","match":"^3","format":"³"},{"mode":"text","match":"^4","format":"⁴"},{"mode":"text","match":"^5","format":"⁵"},{"mode":"text","match":"^6","format":"⁶"},{"mode":"text","match":"^7","format":"⁷"},{"mode":"text","match":"^8","format":"⁸"},{"mode":"text","match":"^9","format":"⁹"},{"mode":"text","match":"~0","format":"₀"},{"mode":"text","match":"~1","format":"₁"},{"mode":"text","match":"~2","format":"₂"},{"mode":"text","match":"~3","format":"₃"},{"mode":"text","match":"~4","format":"₄"},{"mode":"text","match":"~5","format":"₅"},{"mode":"text","match":"~6","format":"₆"},{"mode":"text","match":"~7","format":"₇"},{"mode":"text","match":"~8","format":"₈"},{"mode":"text","match":"~9","format":"₉"}],"enableUndoOnDelete":true},"key":"autoformat","handlers":{},"type":"autoformat","inject":{},"editor":{}},"blockSelection":{"key":"blockSelection","options":{"sizes":{"top":0,"bottom":0,"left":4,"right":4},"query":{"maxLevel":1}},"inject":{},"handlers":{},"_thenReplaced":2,"type":"blockSelection","editor":{}},"combobox":{"key":"combobox","handlers":{},"type":"combobox","options":{},"inject":{},"editor":{}},"dnd":{"key":"dnd","options":{"enableScroller":true},"handlers":{},"_thenReplaced":2,"type":"dnd","inject":{},"editor":{}},"emoji":{"key":"emoji","options":{"id":"emoji","trigger":":","emojiTriggeringController":{"options":{"trigger":":","limitTriggeringChars":2},"_isTriggering":false,"_hasTriggeringMark":false,"text":""}},"_thenReplaced":2,"type":"emoji","inject":{},"editor":{}},"exitBreak":{"options":{"rules":[{"hotkey":"mod+enter"},{"hotkey":"mod+shift+enter","before":true},{"hotkey":"enter","query":{"start":true,"end":true,"allow":["h1","h2","h3","h4","h5","h6"]},"relative":true,"level":1}]},"key":"exitBreak","handlers":{},"type":"exitBreak","inject":{},"editor":{}},"nodeId":{"key":"nodeId","options":{"idKey":"id","filterText":true},"type":"nodeId","inject":{},"editor":{}},"resetNode":{"options":{"rules":[{"types":["blockquote","action_item"],"defaultType":"p","hotkey":"Enter"},{"types":["blockquote","action_item"],"defaultType":"p","hotkey":"Backspace"},{"types":["code_block"],"defaultType":"p","hotkey":"Enter"},{"types":["code_block"],"defaultType":"p","hotkey":"Backspace"}]},"key":"resetNode","handlers":{},"type":"resetNode","inject":{},"editor":{}},"selectOnBackspace":{"options":{"query":{"allow":["img","hr"]},"removeNodeIfEmpty":false},"key":"selectOnBackspace","type":"selectOnBackspace","inject":{},"editor":{}},"softBreak":{"options":{"rules":[{"hotkey":"shift+enter"},{"hotkey":"enter","query":{"allow":["code_block","blockquote","td"]}}]},"key":"softBreak","handlers":{},"type":"softBreak","inject":{},"editor":{}},"tabbable":{"options":{"globalEventListener":false},"key":"tabbable","plugins":[{"key":"tabbable_element","isElement":true,"isVoid":true,"type":"tabbable_element","options":{},"inject":{},"editor":{}}],"type":"tabbable","inject":{},"editor":{}},"tabbable_element":{"key":"tabbable_element","isElement":true,"isVoid":true,"type":"tabbable_element","options":{},"inject":{},"editor":{}},"trailingBlock":{"key":"trailingBlock","options":{"type":"p","level":0},"type":"p","_thenReplaced":2,"inject":{},"editor":{}},"dragOverCursor":{"key":"dragOverCursor","handlers":{},"type":"dragOverCursor","options":{},"inject":{},"editor":{}},"comment":{"key":"comment","isLeaf":true,"options":{"hotkey":["meta+shift+m","ctrl+shift+m"]},"type":"comment","inject":{},"editor":{}},"deserializeDocx":{"key":"deserializeDocx","inject":{"pluginsByKey":{"deserializeHtml":{"editor":{"insertData":{}}}}},"overrideByKey":{"p":{},"h1":{},"h2":{},"h3":{},"h4":{},"h5":{},"h6":{},"img":{"editor":{"insertData":{}}}},"type":"deserializeDocx","options":{},"editor":{}},"deserializeMd":{"key":"deserializeMd","editor":{"insertData":{"format":"text/plain"}},"options":{"elementRules":{"heading":{},"list":{},"listItem":{},"paragraph":{},"link":{},"image":{},"blockquote":{},"code":{},"thematicBreak":{}},"textRules":{"text":{},"emphasis":{},"strong":{},"inlineCode":{},"html":{}},"indentList":false},"_thenReplaced":2,"type":"deserializeMd","inject":{}},"juice":{"key":"juice","inject":{"pluginsByKey":{"deserializeHtml":{"editor":{"insertData":{}}}}},"type":"juice","options":{},"editor":{}}},"history":{"undos":[{"operations":[{"type":"remove_text","path":[2,0],"offset":12,"text":"!"},{"type":"remove_text","path":[2,0],"offset":11,"text":"d"},{"type":"remove_text","path":[2,0],"offset":10,"text":"l"},{"type":"remove_text","path":[2,0],"offset":9,"text":"r"},{"type":"remove_text","path":[2,0],"offset":8,"text":"o"},{"type":"remove_text","path":[2,0],"offset":7,"text":"W"},{"type":"remove_text","path":[2,0],"offset":6,"text":" "},{"type":"remove_text","path":[2,0],"offset":5,"text":","},{"type":"remove_text","path":[2,0],"offset":4,"text":"o"},{"type":"remove_text","path":[2,0],"offset":3,"text":"l"},{"type":"remove_text","path":[2,0],"offset":2,"text":"l"},{"type":"remove_text","path":[2,0],"offset":1,"text":"e"},{"type":"remove_text","path":[2,0],"offset":0,"text":"H"}],"selectionBefore":{"anchor":{"path":[2,0],"offset":13},"focus":{"path":[2,0],"offset":13}}},{"operations":[{"type":"merge_node","path":[2],"position":1,"properties":{"id":"3","type":"p"}},{"type":"merge_node","path":[1,1],"position":28,"properties":{}},{"type":"set_node","path":[1,0],"properties":{},"newProperties":{"type":"code_line"}},{"type":"insert_node","path":[2],"node":{"type":"p","children":[{"text":""}],"id":"lol76"}}],"selectionBefore":{"anchor":{"path":[2,0],"offset":0},"focus":{"path":[2,0],"offset":0}}},{"operations":[{"type":"merge_node","path":[2],"position":1,"properties":{"type":"p","id":"lol76"}},{"type":"remove_node","path":[1,1],"node":{"text":""}}],"selectionBefore":{"anchor":{"path":[2,0],"offset":0},"focus":{"path":[2,0],"offset":0}}}],"redos":[]},"value":[{"id":"1","type":"p","children":[{"text":"Hello, World!"}]},{"id":"2","type":"code_block","children":[{"text":"console.log(\"Hello, World!\")"}]},{"id":"3","type":"p","children":[{"text":"Hello, World!"}]}]}