@lexical/react 0.1.5 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/DEPRECATED_useLexical.dev.js +84 -0
  2. package/DEPRECATED_useLexical.js +9 -2
  3. package/DEPRECATED_useLexical.prod.js +8 -0
  4. package/DEPRECATED_useLexicalAutoFormatter.dev.js +729 -0
  5. package/DEPRECATED_useLexicalAutoFormatter.js +9 -12
  6. package/DEPRECATED_useLexicalAutoFormatter.prod.js +25 -0
  7. package/DEPRECATED_useLexicalCanShowPlaceholder.dev.js +136 -0
  8. package/DEPRECATED_useLexicalCanShowPlaceholder.js +9 -3
  9. package/DEPRECATED_useLexicalCanShowPlaceholder.prod.js +8 -0
  10. package/DEPRECATED_useLexicalCharacterLimit.dev.js +293 -0
  11. package/DEPRECATED_useLexicalCharacterLimit.js +9 -9
  12. package/DEPRECATED_useLexicalCharacterLimit.prod.js +14 -0
  13. package/DEPRECATED_useLexicalDecorators.dev.js +82 -0
  14. package/DEPRECATED_useLexicalDecorators.js +9 -2
  15. package/DEPRECATED_useLexicalDecorators.prod.js +8 -0
  16. package/DEPRECATED_useLexicalEditor.dev.js +52 -0
  17. package/DEPRECATED_useLexicalEditor.js +9 -1
  18. package/DEPRECATED_useLexicalEditor.prod.js +7 -0
  19. package/DEPRECATED_useLexicalEditorEvents.dev.js +96 -0
  20. package/DEPRECATED_useLexicalEditorEvents.js +9 -2
  21. package/DEPRECATED_useLexicalEditorEvents.prod.js +8 -0
  22. package/DEPRECATED_useLexicalHistory.dev.js +342 -0
  23. package/DEPRECATED_useLexicalHistory.js +9 -7
  24. package/DEPRECATED_useLexicalHistory.prod.js +13 -0
  25. package/DEPRECATED_useLexicalList.dev.js +64 -0
  26. package/DEPRECATED_useLexicalList.js +9 -12
  27. package/DEPRECATED_useLexicalList.prod.js +7 -0
  28. package/DEPRECATED_useLexicalPlainText.dev.js +778 -0
  29. package/DEPRECATED_useLexicalPlainText.js +9 -17
  30. package/DEPRECATED_useLexicalPlainText.prod.js +22 -0
  31. package/DEPRECATED_useLexicalRichText.dev.js +1349 -0
  32. package/DEPRECATED_useLexicalRichText.js +9 -30
  33. package/DEPRECATED_useLexicalRichText.prod.js +35 -0
  34. package/LexicalAutoFormatterPlugin.dev.js +732 -0
  35. package/LexicalAutoFormatterPlugin.js +9 -13
  36. package/LexicalAutoFormatterPlugin.prod.js +25 -0
  37. package/LexicalAutoLinkPlugin.dev.js +227 -0
  38. package/LexicalAutoLinkPlugin.js +9 -5
  39. package/LexicalAutoLinkPlugin.prod.js +12 -0
  40. package/LexicalBootstrapPlugin.dev.js +122 -0
  41. package/LexicalBootstrapPlugin.js +9 -0
  42. package/LexicalBootstrapPlugin.prod.js +8 -0
  43. package/LexicalCharacterLimitPlugin.dev.js +351 -0
  44. package/LexicalCharacterLimitPlugin.js +9 -10
  45. package/LexicalCharacterLimitPlugin.prod.js +14 -0
  46. package/LexicalCollaborationPlugin.dev.js +220 -0
  47. package/LexicalCollaborationPlugin.js +9 -8
  48. package/LexicalCollaborationPlugin.prod.js +13 -0
  49. package/LexicalComposer.dev.js +76 -0
  50. package/LexicalComposer.js +9 -2
  51. package/LexicalComposer.prod.js +9 -0
  52. package/LexicalComposerContext.dev.js +53 -0
  53. package/LexicalComposerContext.js +9 -1
  54. package/LexicalComposerContext.prod.js +7 -0
  55. package/LexicalContentEditable.dev.js +71 -0
  56. package/LexicalContentEditable.js +9 -3
  57. package/LexicalContentEditable.prod.js +9 -0
  58. package/LexicalHashtagPlugin.dev.js +152 -0
  59. package/LexicalHashtagPlugin.js +9 -4
  60. package/LexicalHashtagPlugin.prod.js +10 -0
  61. package/LexicalHistoryPlugin.dev.js +347 -0
  62. package/LexicalHistoryPlugin.js +9 -7
  63. package/LexicalHistoryPlugin.prod.js +13 -0
  64. package/LexicalHorizontalRuleNode.dev.js +66 -0
  65. package/LexicalHorizontalRuleNode.js +9 -0
  66. package/LexicalHorizontalRuleNode.prod.js +8 -0
  67. package/LexicalLinkPlugin.dev.js +136 -0
  68. package/LexicalLinkPlugin.js +9 -3
  69. package/LexicalLinkPlugin.prod.js +9 -0
  70. package/LexicalListPlugin.dev.js +67 -0
  71. package/LexicalListPlugin.js +9 -12
  72. package/LexicalListPlugin.prod.js +8 -0
  73. package/LexicalNestedComposer.dev.js +60 -0
  74. package/LexicalNestedComposer.js +9 -1
  75. package/LexicalNestedComposer.prod.js +8 -0
  76. package/LexicalOnChangePlugin.dev.js +57 -0
  77. package/LexicalOnChangePlugin.js +9 -1
  78. package/LexicalOnChangePlugin.prod.js +7 -0
  79. package/LexicalPlainTextPlugin.dev.js +585 -0
  80. package/LexicalPlainTextPlugin.js +9 -13
  81. package/LexicalPlainTextPlugin.prod.js +18 -0
  82. package/LexicalRichTextPlugin.dev.js +1156 -0
  83. package/LexicalRichTextPlugin.js +9 -26
  84. package/LexicalRichTextPlugin.prod.js +31 -0
  85. package/LexicalTablePlugin.dev.js +77 -0
  86. package/LexicalTablePlugin.js +9 -4
  87. package/LexicalTablePlugin.prod.js +9 -0
  88. package/LexicalTreeView.dev.js +340 -0
  89. package/LexicalTreeView.js +9 -12
  90. package/LexicalTreeView.prod.js +19 -0
  91. package/README.md +10 -5
  92. package/package.json +5 -4
  93. package/useLexicalDecoratorMap.dev.js +83 -0
  94. package/useLexicalDecoratorMap.js +9 -1
  95. package/useLexicalDecoratorMap.prod.js +8 -0
  96. package/useLexicalIsTextContentEmpty.dev.js +84 -0
  97. package/useLexicalIsTextContentEmpty.js +9 -2
  98. package/useLexicalIsTextContentEmpty.prod.js +8 -0
  99. package/withSubscriptions.dev.js +23 -0
  100. package/withSubscriptions.js +9 -1
  101. package/withSubscriptions.prod.js +7 -0
  102. package/LexicalHorizontalRulePlugin.js +0 -1
@@ -1,17 +1,9 @@
1
- 'use strict';var h=require("lexical"),u=require("lexical/ParagraphNode"),v=require("react"),w=require("@lexical/react/withSubscriptions");
2
- function x(a){v.useEffect(()=>{const b=e=>{var d=a.getRootElement();if(document.activeElement===d&&(d=e.data,"string"===typeof d)){try{var c=JSON.parse(d)}catch(f){return}if(c&&"nuanria_messaging"===c.protocol&&"request"===c.type&&(c=c.payload)&&"makeChanges"===c.functionId&&(c=c.args)){const [f,g,k,l,r]=c;a.update(()=>{h.$log("useLexicalDragonSupport");const t=h.$getSelection();if(null!==t){var m=t.anchor;let p=m.getNode(),n=0,q=0;h.$isTextNode(p)&&0<=f&&0<=g&&(n=f,q=f+g,t.setTextNodeRange(p,n,p,
3
- q));if(n!==q||""!==k)t.insertRawText(k),p=m.getNode();h.$isTextNode(p)&&(n=l,q=l+r,m=p.getTextContentSize(),n=n>m?m:n,q=q>m?m:q,t.setTextNodeRange(p,n,p,q));e.stopImmediatePropagation()}})}}};window.addEventListener("message",b,!0);return()=>{window.removeEventListener("message",b,!0)}},[a])}function y(a,b){a=a.getData("text/plain");null!=a&&b.insertRawText(a)}
4
- function z(a,b){var e=a.focus;a=e.offset;"element"===e.type?b=e.getNode().getChildAtIndex(b?a-1:a):(e=e.getNode(),b=b&&0===a||!b&&a===e.getTextContentSize()?b?e.getPreviousSibling():e.getNextSibling():null);return h.$isDecoratorNode(b)}function A(a,b){a.preventDefault();b.update(()=>{h.$log("onPasteForPlainText");const e=h.$getSelection(),d=a.clipboardData;null!=d&&null!==e&&y(d,e)})}
5
- function B(a,b){C(a,b);b.update(()=>{h.$log("onCutForPlainText");const e=h.$getSelection();null!==e&&e.removeText()})}function C(a,b){a.preventDefault();b.update(()=>{h.$log("onCopyForPlainText");const e=a.clipboardData,d=h.$getSelection();if(null!==d&&null!=e){var c=window.getSelection();if(!c.isCollapsed){var f=c.getRangeAt(0);f&&(c=document.createElement("div"),f=f.cloneContents(),c.appendChild(f),e.setData("text/html",c.innerHTML));e.setData("text/plain",d.getTextContent())}}})}
6
- var D="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?v.useLayoutEffect:v.useEffect;function E(a,b){const e=u.$createParagraphNode();a.append(e);a=document.activeElement;(null!==h.$getSelection()||null!==a&&a===b.getRootElement())&&e.select()}function F(a){a.update(()=>{h.$log("initEditor");const b=h.$getRoot();null===b.getFirstChild()&&E(b,a)})}
7
- function G(a,b){a.update(()=>{h.$log("clearEditor");const e=h.$getRoot();e.clear();E(e,a)},{onUpdate:b})}
8
- function H(a,b){D(()=>{const e=w(a.registerNodes([u.ParagraphNode]),a.addListener("command",(d,c)=>{const f=h.$getSelection();if(null===f)return!1;switch(d){case "deleteCharacter":return f.deleteCharacter(c),!0;case "deleteWord":return f.deleteWord(c),!0;case "deleteLine":return f.deleteLine(c),!0;case "insertText":return"string"===typeof c?f.insertText(c):(d=c.dataTransfer,null!=d?y(d,f):(c=c.data)&&f.insertText(c)),!0;case "removeText":return f.removeText(),!0;case "insertLineBreak":return f.insertLineBreak(c),
9
- !0;case "insertParagraph":return f.insertLineBreak(),!0;case "indentContent":case "outdentContent":case "insertHorizontalRule":case "insertImage":case "insertTable":case "formatElement":case "formatText":return!0;case "keyArrowLeft":d=c.shiftKey;if(z(f,!0))return c.preventDefault(),c=d,d="rtl"===f.anchor.getNode().getParentOrThrow().getDirection(),f.modify(c?"extend":"move",!d,"character"),!0;break;case "keyArrowRight":d=c.shiftKey;if(z(f,!1))return c.preventDefault(),c=d,d="rtl"===f.anchor.getNode().getParentOrThrow().getDirection(),
10
- f.modify(c?"extend":"move",d,"character"),!0;break;case "keyBackspace":return c.preventDefault(),a.execCommand("deleteCharacter",!0);case "keyDelete":return c.preventDefault(),a.execCommand("deleteCharacter",!1);case "keyEnter":return c.preventDefault(),a.execCommand("insertLineBreak");case "clearEditor":G(a);break;case "copy":return C(c,a),!0;case "cut":return B(c,a),!0;case "paste":return A(c,a),!0;case "drop":case "dragstart":return c.preventDefault(),!0}return!1},0));b&&F(a);return e},[a,b]);
11
- x(a)}function I(a,b,e){b=Array.from(b);e=Array.from(e);a=a._nodeMap;const d=[];for(var c=0;c<b.length;c++){const f=a.get(b[c]);void 0!==f&&d.push(f)}for(b=0;b<e.length;b++)e[b][1]&&(c=a.get(e[b][0]),void 0===c||h.$isRootNode(c)||d.push(c));return d}
12
- function J(a,b,e,d,c){if(null===a||0===e.size&&0===d.size)return 0;var f=b._selection,g=a._selection;if(c)return 1;if(null===f||null===g||!g.isCollapsed()||!f.isCollapsed())return 0;e=I(b,e,d);if(0===e.length)return 0;if(1<e.length){b=b._nodeMap;g=b.get(g.anchor.key);const k=b.get(f.anchor.key);return h.$isTextNode(k)&&h.$isElementNode(g)&&!a._nodeMap.has(k.__key)&&1===k.__text.length&&1===f.anchor.offset?e.every(l=>l===k||!h.$isTextNode(l))?2:0:0}b=e[0];a=a._nodeMap.get(b.__key);if(!h.$isTextNode(a)||
13
- !h.$isTextNode(b)||a.__mode!==b.__mode)return 0;a=a.__text;b=b.__text;if(a===b)return 0;f=f.anchor;g=g.anchor;if(f.key!==g.key||"text"!==f.type)return 0;f=f.offset;g=g.offset;a=b.length-a.length;return 1===a&&g===f-1?2:-1===a&&g===f+1?3:-1===a&&g===f?4:0}
14
- function K(a,b){let e=Date.now(),d=0;return(c,f,g,k,l,r)=>{const t=Date.now();if(r.has("historic"))return d=0,e=t,2;const m=J(c,f,k,l,a.isComposing()),p=(()=>{if(r.has("without-history"))return 0;if(null===c)return 1;var n=f._selection;const q=c._selection;if(!(0<k.size||0<l.size))return null===q&&null!==n?0:2;n=null===g||g.editor===a;return 0!==m&&m===d&&t<e+b&&n?0:1})();e=t;d=m;return p}}
15
- function L(a,b,e=1E3){const d=v.useMemo(()=>b||{current:null,redoStack:[],undoStack:[]},[b]),c=v.useCallback(()=>{d.undoStack=[];d.redoStack=[];d.current=null},[d]);v.useEffect(()=>{const f=K(a,e);return w(a.addListener("command",g=>{switch(g){case "undo":g=d.redoStack;var k=d.undoStack;if(0!==k.length){var l=d.current;const r=k.pop();null!==l&&(g.push(l),a.execCommand("canRedo",!0));0===k.length&&a.execCommand("canUndo",!1);d.current=r;r.editor.setEditorState(r.editorState.clone(r.undoSelection),
16
- {tag:"historic"})}return!0;case "redo":return g=d.redoStack,k=d.undoStack,0!==g.length&&(l=d.current,null!==l&&(k.push(l),a.execCommand("canUndo",!0)),k=g.pop(),0===g.length&&a.execCommand("canRedo",!1),d.current=k,k.editor.setEditorState(k.editorState,{tag:"historic"})),!0;case "clearEditor":return c(),!1;case "clearHistory":return c(),!0;default:return!1}},0),a.addListener("update",({editorState:g,prevEditorState:k,dirtyLeaves:l,dirtyElements:r,tags:t})=>{const m=d.current,p=d.redoStack,n=d.undoStack,
17
- q=null===m?null:m.editorState;if(null===m||g!==q){l=f(k,g,m,l,r,t);if(1===l)0!==p.length&&(d.redoStack=[]),null!==m&&(n.push({...m,undoSelection:k.read(h.$getSelection)}),a.execCommand("canUndo",!0));else if(2===l)return;d.current={editor:a,editorState:g}}}))},[c,e,a,d])}function M(a,b,e=1E3){return L(a,b,e)}module.exports=function(a,b){H(a,!0);M(a,b)};
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ 'use strict'
8
+ const DEPRECATED_useLexicalPlainText = process.env.NODE_ENV === 'development' ? require('./DEPRECATED_useLexicalPlainText.dev.js') : require('./DEPRECATED_useLexicalPlainText.prod.js')
9
+ module.exports = DEPRECATED_useLexicalPlainText;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ var n=require("@lexical/react/withSubscriptions"),u=require("lexical"),v=require("react");
8
+ function w(a,d,c,b,e){if(null===a||0===c.size&&0===b.size)return 0;var g=d._selection,f=a._selection;if(e)return 1;if(null===g||null===f||!f.isCollapsed()||!g.isCollapsed())return 0;var h=Array.from(c);b=Array.from(b);c=d._nodeMap;e=[];for(var k=0;k<h.length;k++){const m=c.get(h[k]);void 0!==m&&e.push(m)}for(h=0;h<b.length;h++)b[h][1]&&(k=c.get(b[h][0]),void 0===k||u.$isRootNode(k)||e.push(k));if(0===e.length)return 0;if(1<e.length)return b=d._nodeMap,d=b.get(g.anchor.key),f=b.get(f.anchor.key),d&&
9
+ f&&!a._nodeMap.has(d.__key)&&u.$isTextNode(d)&&1===d.__text.length&&1===g.anchor.offset?2:0;d=e[0];a=a._nodeMap.get(d.__key);if(!u.$isTextNode(a)||!u.$isTextNode(d)||a.__mode!==d.__mode)return 0;a=a.__text;d=d.__text;if(a===d)return 0;g=g.anchor;f=f.anchor;if(g.key!==f.key||"text"!==g.type)return 0;g=g.offset;f=f.offset;a=d.length-a.length;return 1===a&&f===g-1?2:-1===a&&f===g+1?3:-1===a&&f===g?4:0}
10
+ function x(a,d){let c=Date.now(),b=0;return(e,g,f,h,k,m)=>{const t=Date.now();if(m.has("historic"))return b=0,c=t,2;const l=w(e,g,h,k,a.isComposing()),r=(()=>{const q=m.has("history-push");if(!q&&m.has("history-merge"))return 0;if(null===e)return 1;var p=g._selection;const D=e._selection;if(!(0<h.size||0<k.size))return null===D&&null!==p?0:2;p=null===f||f.editor===a;return!1===q&&0!==l&&l===b&&t<c+d&&p?0:1})();c=t;b=l;return r}}
11
+ function y(a,d,c=1E3){const b=v.useMemo(()=>d||{current:null,redoStack:[],undoStack:[]},[d]),e=v.useCallback(()=>{b.undoStack=[];b.redoStack=[];b.current=null},[b]);v.useEffect(()=>{const g=x(a,c);return n(a.addListener("command",f=>{switch(f){case "undo":f=b.redoStack;var h=b.undoStack;if(0!==h.length){var k=b.current;const m=h.pop();null!==k&&(f.push(k),a.execCommand("canRedo",!0));0===h.length&&a.execCommand("canUndo",!1);b.current=m;m.editor.setEditorState(m.editorState.clone(m.undoSelection),
12
+ {tag:"historic"})}return!0;case "redo":return f=b.redoStack,h=b.undoStack,0!==f.length&&(k=b.current,null!==k&&(h.push(k),a.execCommand("canUndo",!0)),h=f.pop(),0===f.length&&a.execCommand("canRedo",!1),b.current=h,h.editor.setEditorState(h.editorState,{tag:"historic"})),!0;case "clearEditor":return e(),!1;case "clearHistory":return e(),!0;default:return!1}},0),a.addListener("update",({editorState:f,prevEditorState:h,dirtyLeaves:k,dirtyElements:m,tags:t})=>{const l=b.current,r=b.redoStack,q=b.undoStack,
13
+ p=null===l?null:l.editorState;if(null===l||f!==p){k=g(h,f,l,k,m,t);if(1===k)0!==r.length&&(b.redoStack=[]),null!==l&&(q.push({...l,undoSelection:h.read(u.$getSelection)}),a.execCommand("canUndo",!0));else if(2===k)return;b.current={editor:a,editorState:f}}}))},[e,c,a,b])}function z(a,d,c=1E3){return y(a,d,c)}function A(a){a=a.anchor.getNode();return"rtl"===(u.$isRootNode(a)?a:a.getParentOrThrow()).getDirection()}
14
+ function B(a,d,c){const b=a.getParent();let e=c;null!==b&&(d&&0===c?(e=a.getIndexWithinParent(),a=b):d||c!==a.getChildrenSize()||(e=a.getIndexWithinParent()+1,a=b));return a.getChildAtIndex(d?e-1:e)}function C(a,d){a=a.getData("text/plain");null!=a&&d.insertRawText(a)}
15
+ function E(a,d){var c=a.focus;a=c.offset;"element"===c.type?(c=c.getNode(),d=B(c,d,a)):(c=c.getNode(),d&&0===a||!d&&a===c.getTextContentSize()?(a=d?c.getPreviousSibling():c.getNextSibling(),d=null===a?B(c.getParentOrThrow(),d,c.getIndexWithinParent()+(d?0:1)):a):d=null);return u.$isDecoratorNode(d)&&!d.isIsolated()}function F(a,d){a.preventDefault();d.update(()=>{const c=u.$getSelection(),b=a.clipboardData;null!=b&&null!==c&&C(b,c)})}
16
+ function G(a,d){H(a,d);d.update(()=>{const c=u.$getSelection();null!==c&&c.removeText()})}function H(a,d){a.preventDefault();d.update(()=>{const c=a.clipboardData,b=u.$getSelection();if(null!==b&&null!=c){var e=window.getSelection();if(!e.isCollapsed){var g=e.getRangeAt(0);g&&(e=document.createElement("div"),g=g.cloneContents(),e.appendChild(g),c.setData("text/html",e.innerHTML));c.setData("text/plain",b.getTextContent())}}})}
17
+ var I="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?v.useLayoutEffect:v.useEffect;
18
+ function J(a){v.useEffect(()=>{const d=c=>{var b=a.getRootElement();if(document.activeElement===b&&(b=c.data,"string"===typeof b)){try{var e=JSON.parse(b)}catch(g){return}if(e&&"nuanria_messaging"===e.protocol&&"request"===e.type&&(e=e.payload)&&"makeChanges"===e.functionId&&(e=e.args)){const [g,f,h,k,m]=e;a.update(()=>{const t=u.$getSelection();if(null!==t){var l=t.anchor;let r=l.getNode(),q=0,p=0;u.$isTextNode(r)&&0<=g&&0<=f&&(q=g,p=g+f,t.setTextNodeRange(r,q,r,p));if(q!==p||""!==h)t.insertRawText(h),
19
+ r=l.getNode();u.$isTextNode(r)&&(q=k,p=k+m,l=r.getTextContentSize(),q=q>l?l:q,p=p>l?l:p,t.setTextNodeRange(r,q,r,p));c.stopImmediatePropagation()}})}}};window.addEventListener("message",d,!0);return()=>{window.removeEventListener("message",d,!0)}},[a])}
20
+ function K(a){I(()=>{const d=a.addListener("command",(c,b)=>{const e=u.$getSelection();if(null===e)return!1;switch(c){case "deleteCharacter":return e.deleteCharacter(b),!0;case "deleteWord":return e.deleteWord(b),!0;case "deleteLine":return e.deleteLine(b),!0;case "insertText":return"string"===typeof b?e.insertText(b):(c=b.dataTransfer,null!=c?C(c,e):(b=b.data)&&e.insertText(b)),!0;case "removeText":return e.removeText(),!0;case "insertLineBreak":return e.insertLineBreak(b),!0;case "insertParagraph":return e.insertLineBreak(),
21
+ !0;case "indentContent":case "outdentContent":case "insertHorizontalRule":case "insertImage":case "insertTable":case "formatElement":case "formatText":return!0;case "keyArrowLeft":c=b.shiftKey;if(E(e,!0))return b.preventDefault(),b=c,c=A(e),e.modify(b?"extend":"move",!c,"character"),!0;break;case "keyArrowRight":c=b.shiftKey;if(E(e,!1))return b.preventDefault(),b=c,c=A(e),e.modify(b?"extend":"move",c,"character"),!0;break;case "keyBackspace":return b.preventDefault(),a.execCommand("deleteCharacter",
22
+ !0);case "keyDelete":return b.preventDefault(),a.execCommand("deleteCharacter",!1);case "keyEnter":return b.preventDefault(),a.execCommand("insertLineBreak");case "copy":return H(b,a),!0;case "cut":return G(b,a),!0;case "paste":return F(b,a),!0;case "drop":case "dragstart":return b.preventDefault(),!0}return!1},0);a.execCommand("bootstrapEditor");return d},[a]);J(a)}module.exports=function(a,d){K(a);z(a,d)};