@procore/text-editor 0.0.1

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 (161) hide show
  1. package/.jest/ckeditorMock.js +67 -0
  2. package/.jest/esToolkitMock.js +23 -0
  3. package/.jest/setupTests.js +33 -0
  4. package/.jest/styleMock.js +1 -0
  5. package/.jest/svgTransform.js +10 -0
  6. package/.jest/translationFileMock.js +4 -0
  7. package/.jest/translationMock.js +12 -0
  8. package/LICENSE +84 -0
  9. package/README.md +107 -0
  10. package/codemod/__fixtures__/hammer.config.mjs +15 -0
  11. package/codemod/__fixtures__/jest.config.js +6 -0
  12. package/codemod/__fixtures__/procore.config.js +12 -0
  13. package/codemod/__fixtures__/src/components/ComplexEditor.tsx +21 -0
  14. package/codemod/__fixtures__/src/components/FormWithRichText.tsx +10 -0
  15. package/codemod/__fixtures__/src/components/MultilineFormRichText.tsx +14 -0
  16. package/codemod/__fixtures__/src/components/NoTextEditor.tsx +11 -0
  17. package/codemod/__fixtures__/src/components/ReadOnlyRichText.tsx +10 -0
  18. package/codemod/__fixtures__/src/components/SimpleEditor.tsx +11 -0
  19. package/codemod/__fixtures__/src/components/TypeImportEditor.tsx +17 -0
  20. package/codemod/text-editor-migrate.js +509 -0
  21. package/codemod/text-editor-migrate.test.js +225 -0
  22. package/dist/TextEditor/EditorError.js +9 -0
  23. package/dist/TextEditor/EditorError.js.map +1 -0
  24. package/dist/TextEditor/StickyToolbar/index.js +2 -0
  25. package/dist/TextEditor/StickyToolbar/index.js.map +1 -0
  26. package/dist/TextEditor/StickyToolbar/useStickyToolbar.js +59 -0
  27. package/dist/TextEditor/StickyToolbar/useStickyToolbar.js.map +1 -0
  28. package/dist/TextEditor/StickyToolbar/useStickyToolbar.types.js +2 -0
  29. package/dist/TextEditor/StickyToolbar/useStickyToolbar.types.js.map +1 -0
  30. package/dist/TextEditor/TextEditor.js +226 -0
  31. package/dist/TextEditor/TextEditor.js.map +1 -0
  32. package/dist/TextEditor/TextEditor.styles.js +26 -0
  33. package/dist/TextEditor/TextEditor.styles.js.map +1 -0
  34. package/dist/TextEditor/TextEditor.types.js +2 -0
  35. package/dist/TextEditor/TextEditor.types.js.map +1 -0
  36. package/dist/TextEditor/TextEditorProvider.js +17 -0
  37. package/dist/TextEditor/TextEditorProvider.js.map +1 -0
  38. package/dist/TextEditor/TextEditorProvider.types.js +2 -0
  39. package/dist/TextEditor/TextEditorProvider.types.js.map +1 -0
  40. package/dist/TextEditor/index.js +4 -0
  41. package/dist/TextEditor/index.js.map +1 -0
  42. package/dist/TextEditor/license_key.js +3 -0
  43. package/dist/TextEditor/license_key.js.map +1 -0
  44. package/dist/TextEditor/plugins/CutPlugin/CutCommand.js +99 -0
  45. package/dist/TextEditor/plugins/CutPlugin/CutCommand.js.map +1 -0
  46. package/dist/TextEditor/plugins/CutPlugin/CutPlugin.js +56 -0
  47. package/dist/TextEditor/plugins/CutPlugin/CutPlugin.js.map +1 -0
  48. package/dist/TextEditor/plugins/CutPlugin/index.js +2 -0
  49. package/dist/TextEditor/plugins/CutPlugin/index.js.map +1 -0
  50. package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.js +40 -0
  51. package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.js.map +1 -0
  52. package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/index.js +2 -0
  53. package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/index.js.map +1 -0
  54. package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.js +86 -0
  55. package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.js.map +1 -0
  56. package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.js +56 -0
  57. package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.js.map +1 -0
  58. package/dist/TextEditor/plugins/PasteAsTextPlugin/index.js +2 -0
  59. package/dist/TextEditor/plugins/PasteAsTextPlugin/index.js.map +1 -0
  60. package/dist/TextEditor/plugins/PastePlugin/PasteCommand.js +149 -0
  61. package/dist/TextEditor/plugins/PastePlugin/PasteCommand.js.map +1 -0
  62. package/dist/TextEditor/plugins/PastePlugin/PastePlugin.js +56 -0
  63. package/dist/TextEditor/plugins/PastePlugin/PastePlugin.js.map +1 -0
  64. package/dist/TextEditor/plugins/PastePlugin/index.js +2 -0
  65. package/dist/TextEditor/plugins/PastePlugin/index.js.map +1 -0
  66. package/dist/TextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.js +87 -0
  67. package/dist/TextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.js.map +1 -0
  68. package/dist/TextEditor/plugins/TabSpacesPlugin/index.js +2 -0
  69. package/dist/TextEditor/plugins/TabSpacesPlugin/index.js.map +1 -0
  70. package/dist/TextEditor/textEditorTheming/icons.js +24 -0
  71. package/dist/TextEditor/textEditorTheming/icons.js.map +1 -0
  72. package/dist/TextEditor/textEditorTheming/index.js +2 -0
  73. package/dist/TextEditor/textEditorTheming/index.js.map +1 -0
  74. package/dist/TextEditor/textEditorTheming/textEditorTheming.styles.js +10 -0
  75. package/dist/TextEditor/textEditorTheming/textEditorTheming.styles.js.map +1 -0
  76. package/dist/TextEditor/useCKEditorCss.js +36 -0
  77. package/dist/TextEditor/useCKEditorCss.js.map +1 -0
  78. package/dist/TextEditor/useTabAsNavigation.js +29 -0
  79. package/dist/TextEditor/useTabAsNavigation.js.map +1 -0
  80. package/dist/TextEditor/utils/config.js +179 -0
  81. package/dist/TextEditor/utils/config.js.map +1 -0
  82. package/dist/TextEditor/utils/index.js +3 -0
  83. package/dist/TextEditor/utils/index.js.map +1 -0
  84. package/dist/TextEditor/utils/locale.js +102 -0
  85. package/dist/TextEditor/utils/locale.js.map +1 -0
  86. package/dist/TextEditor/utils/plugins.js +184 -0
  87. package/dist/TextEditor/utils/plugins.js.map +1 -0
  88. package/dist/TextEditorOutput/TextEditorOutput.js +29 -0
  89. package/dist/TextEditorOutput/TextEditorOutput.js.map +1 -0
  90. package/dist/TextEditorOutput/TextEditorOutput.styles.js +6 -0
  91. package/dist/TextEditorOutput/TextEditorOutput.styles.js.map +1 -0
  92. package/dist/TextEditorOutput/TextEditorOutput.types.js +2 -0
  93. package/dist/TextEditorOutput/TextEditorOutput.types.js.map +1 -0
  94. package/dist/TextEditorOutput/TextEditorOutput.utils.js +59 -0
  95. package/dist/TextEditorOutput/TextEditorOutput.utils.js.map +1 -0
  96. package/dist/TextEditorOutput/index.js +2 -0
  97. package/dist/TextEditorOutput/index.js.map +1 -0
  98. package/dist/_storyHelpers/constants.js +48 -0
  99. package/dist/_storyHelpers/constants.js.map +1 -0
  100. package/dist/_typedoc/TextEditor/TextEditor.types.json +227 -0
  101. package/dist/_typedoc/TextEditor/TextEditorProvider.types.json +28 -0
  102. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +38 -0
  103. package/dist/_typedoc/deprecations.json +1 -0
  104. package/dist/_utils/propsTypedoc.js +4 -0
  105. package/dist/_utils/propsTypedoc.js.map +1 -0
  106. package/dist/codemod/__fixtures__/src/components/ComplexEditor.d.ts +2 -0
  107. package/dist/codemod/__fixtures__/src/components/FormWithRichText.d.ts +2 -0
  108. package/dist/codemod/__fixtures__/src/components/MultilineFormRichText.d.ts +2 -0
  109. package/dist/codemod/__fixtures__/src/components/NoTextEditor.d.ts +2 -0
  110. package/dist/codemod/__fixtures__/src/components/ReadOnlyRichText.d.ts +2 -0
  111. package/dist/codemod/__fixtures__/src/components/SimpleEditor.d.ts +2 -0
  112. package/dist/codemod/__fixtures__/src/components/TypeImportEditor.d.ts +2 -0
  113. package/dist/index.js +3 -0
  114. package/dist/index.js.map +1 -0
  115. package/dist/src/TextEditor/EditorError.d.ts +2 -0
  116. package/dist/src/TextEditor/StickyToolbar/index.d.ts +2 -0
  117. package/dist/src/TextEditor/StickyToolbar/useStickyToolbar.d.ts +2 -0
  118. package/dist/src/TextEditor/StickyToolbar/useStickyToolbar.types.d.ts +8 -0
  119. package/dist/src/TextEditor/TextEditor.d.ts +44 -0
  120. package/dist/src/TextEditor/TextEditor.styles.d.ts +7 -0
  121. package/dist/src/TextEditor/TextEditor.types.d.ts +155 -0
  122. package/dist/src/TextEditor/TextEditorProvider.d.ts +4 -0
  123. package/dist/src/TextEditor/TextEditorProvider.types.d.ts +14 -0
  124. package/dist/src/TextEditor/index.d.ts +4 -0
  125. package/dist/src/TextEditor/license_key.d.ts +2 -0
  126. package/dist/src/TextEditor/plugins/CutPlugin/CutCommand.d.ts +5 -0
  127. package/dist/src/TextEditor/plugins/CutPlugin/CutPlugin.d.ts +5 -0
  128. package/dist/src/TextEditor/plugins/CutPlugin/index.d.ts +1 -0
  129. package/dist/src/TextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.d.ts +5 -0
  130. package/dist/src/TextEditor/plugins/IndentPaddingToMarginPlugin/index.d.ts +1 -0
  131. package/dist/src/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.d.ts +5 -0
  132. package/dist/src/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.d.ts +5 -0
  133. package/dist/src/TextEditor/plugins/PasteAsTextPlugin/index.d.ts +1 -0
  134. package/dist/src/TextEditor/plugins/PastePlugin/PasteCommand.d.ts +5 -0
  135. package/dist/src/TextEditor/plugins/PastePlugin/PastePlugin.d.ts +5 -0
  136. package/dist/src/TextEditor/plugins/PastePlugin/index.d.ts +1 -0
  137. package/dist/src/TextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.d.ts +6 -0
  138. package/dist/src/TextEditor/plugins/TabSpacesPlugin/index.d.ts +1 -0
  139. package/dist/src/TextEditor/textEditorTheming/icons.d.ts +23 -0
  140. package/dist/src/TextEditor/textEditorTheming/index.d.ts +1 -0
  141. package/dist/src/TextEditor/textEditorTheming/textEditorTheming.styles.d.ts +2 -0
  142. package/dist/src/TextEditor/useCKEditorCss.d.ts +3 -0
  143. package/dist/src/TextEditor/useTabAsNavigation.d.ts +11 -0
  144. package/dist/src/TextEditor/utils/config.d.ts +3 -0
  145. package/dist/src/TextEditor/utils/index.d.ts +2 -0
  146. package/dist/src/TextEditor/utils/locale.d.ts +3 -0
  147. package/dist/src/TextEditor/utils/plugins.d.ts +7 -0
  148. package/dist/src/TextEditorOutput/TextEditorOutput.d.ts +8 -0
  149. package/dist/src/TextEditorOutput/TextEditorOutput.styles.d.ts +2 -0
  150. package/dist/src/TextEditorOutput/TextEditorOutput.types.d.ts +21 -0
  151. package/dist/src/TextEditorOutput/TextEditorOutput.utils.d.ts +2 -0
  152. package/dist/src/TextEditorOutput/index.d.ts +2 -0
  153. package/dist/src/_storyHelpers/constants.d.ts +14 -0
  154. package/dist/src/_utils/propsTypedoc.d.ts +3 -0
  155. package/dist/src/index.d.ts +2 -0
  156. package/dist/src/stories/util.d.ts +21 -0
  157. package/dist/stories/util.js +86 -0
  158. package/dist/stories/util.js.map +1 -0
  159. package/jestConfig.d.ts +1 -0
  160. package/jestConfig.js +66 -0
  161. package/package.json +146 -0
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ export var TextEditorContext = /*#__PURE__*/React.createContext({
3
+ features: {
4
+ tabAsNavigation: undefined,
5
+ stickyToolbar: undefined
6
+ }
7
+ });
8
+ export function TextEditorProvider(_ref) {
9
+ var children = _ref.children,
10
+ features = _ref.features;
11
+ return /*#__PURE__*/React.createElement(TextEditorContext.Provider, {
12
+ value: {
13
+ features: features
14
+ }
15
+ }, children);
16
+ }
17
+ //# sourceMappingURL=TextEditorProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextEditorProvider.js","names":["React","TextEditorContext","createContext","features","tabAsNavigation","undefined","stickyToolbar","TextEditorProvider","_ref","children","createElement","Provider","value"],"sources":["../../src/TextEditor/TextEditorProvider.tsx"],"sourcesContent":["import React from 'react'\nimport type { TextEditorProviderProps } from './TextEditorProvider.types'\n\nexport const TextEditorContext = React.createContext<\n Omit<TextEditorProviderProps, 'children'>\n>({\n features: {\n tabAsNavigation: undefined,\n stickyToolbar: undefined,\n },\n})\n\nexport function TextEditorProvider({\n children,\n features,\n}: TextEditorProviderProps) {\n return (\n <TextEditorContext.Provider value={{ features }}>\n {children}\n </TextEditorContext.Provider>\n )\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAGzB,OAAO,IAAMC,iBAAiB,gBAAGD,KAAK,CAACE,aAAa,CAElD;EACAC,QAAQ,EAAE;IACRC,eAAe,EAAEC,SAAS;IAC1BC,aAAa,EAAED;EACjB;AACF,CAAC,CAAC;AAEF,OAAO,SAASE,kBAAkBA,CAAAC,IAAA,EAGN;EAAA,IAF1BC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRN,QAAQ,GAAAK,IAAA,CAARL,QAAQ;EAER,oBACEH,KAAA,CAAAU,aAAA,CAACT,iBAAiB,CAACU,QAAQ;IAACC,KAAK,EAAE;MAAET,QAAQ,EAARA;IAAS;EAAE,GAC7CM,QACyB,CAAC;AAEjC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TextEditorProvider.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextEditorProvider.types.js","names":[],"sources":["../../src/TextEditor/TextEditorProvider.types.ts"],"sourcesContent":["import type React from 'react'\n\ntype TextEditorFeatureToggle = {\n stickyToolbar?: boolean\n tabAsNavigation?: boolean\n}\n\nexport interface TextEditorProviderProps {\n children: React.ReactNode\n /**\n * - `stickyToolbar` - Have the editor toolbar stick to the top when content is longer than the page length.\n * - `tabAsNavigation` - Have `Tab` key exit the editor. Support `Alt`/`Opt` + `Tab` as triple space indent.\n */\n features?: TextEditorFeatureToggle\n}\n"],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export { TextEditor } from './TextEditor';
2
+ export * from './TextEditor.types';
3
+ export { TextEditorProvider } from './TextEditorProvider';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["TextEditor","TextEditorProvider"],"sources":["../../src/TextEditor/index.ts"],"sourcesContent":["export { TextEditor } from './TextEditor'\nexport * from './TextEditor.types'\nexport { TextEditorProvider } from './TextEditorProvider'\nexport type { TextEditorProviderProps } from './TextEditorProvider.types'\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,cAAc,oBAAoB;AAClC,SAASC,kBAAkB,QAAQ,sBAAsB"}
@@ -0,0 +1,3 @@
1
+ export var DEV_CK_EDITOR_LICENSE_KEY = 'eyJhbGciOiJFUzI1NiJ9.eyJleHAiOjE3NzQzOTY3OTksImp0aSI6IjE5OGE3YzVmLTkzMDEtNDI4ZC04MDBkLTI3ODQzMWNjMWFhNyIsImRpc3RyaWJ1dGlvbkNoYW5uZWwiOlsic2giLCJkcnVwYWwiXSwid2hpdGVMYWJlbCI6dHJ1ZSwibGljZW5zZVR5cGUiOiJkZXZlbG9wbWVudCIsImZlYXR1cmVzIjpbIkRSVVAiLCJETyIsIkZQIiwiU0MiLCJUT0MiLCJUUEwiLCJQT0UiLCJDQyIsIk1GIiwiU0VFIiwiRUNIIiwiRUlTIiwiTUxMIl0sInZjIjoiOGExYzM1YzkifQ.aWj6JvSWU5pe23uotIIJAtM0vo6Rc4bDUuKIJPCwEI4F70gtB5MrR3-fBI8dQpBUDhe5vL7wFBq0EdoCdMJ9TQ';
2
+ export var CK_EDITOR_LICENSE_KEY = 'eyJhbGciOiJFUzI1NiJ9.eyJleHAiOjE3NzQzOTY3OTksImp0aSI6ImEyOTVlM2M0LTdlNzMtNDBiNC1hNWI3LTZhNmNmNDFkYzlkNiIsImRpc3RyaWJ1dGlvbkNoYW5uZWwiOlsic2giLCJkcnVwYWwiXSwid2hpdGVMYWJlbCI6dHJ1ZSwiZmVhdHVyZXMiOlsiRFJVUCIsIkRPIiwiRlAiLCJTQyIsIlRPQyIsIlRQTCIsIlBPRSIsIkNDIiwiTUYiLCJTRUUiLCJFQ0giLCJFSVMiLCJNTEwiXSwidmMiOiI4MzU4Nzg0NyJ9.IP1OzVjd-e297egGXW2SnaAmQFl1flhb0kYSv1M4JlKkrmbcVhJLSHvtV5jiwVTegeBkSQZyO6r-1E4OJ-O76g';
3
+ //# sourceMappingURL=license_key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"license_key.js","names":["DEV_CK_EDITOR_LICENSE_KEY","CK_EDITOR_LICENSE_KEY"],"sources":["../../src/TextEditor/license_key.ts"],"sourcesContent":["export const DEV_CK_EDITOR_LICENSE_KEY =\n 'eyJhbGciOiJFUzI1NiJ9.eyJleHAiOjE3NzQzOTY3OTksImp0aSI6IjE5OGE3YzVmLTkzMDEtNDI4ZC04MDBkLTI3ODQzMWNjMWFhNyIsImRpc3RyaWJ1dGlvbkNoYW5uZWwiOlsic2giLCJkcnVwYWwiXSwid2hpdGVMYWJlbCI6dHJ1ZSwibGljZW5zZVR5cGUiOiJkZXZlbG9wbWVudCIsImZlYXR1cmVzIjpbIkRSVVAiLCJETyIsIkZQIiwiU0MiLCJUT0MiLCJUUEwiLCJQT0UiLCJDQyIsIk1GIiwiU0VFIiwiRUNIIiwiRUlTIiwiTUxMIl0sInZjIjoiOGExYzM1YzkifQ.aWj6JvSWU5pe23uotIIJAtM0vo6Rc4bDUuKIJPCwEI4F70gtB5MrR3-fBI8dQpBUDhe5vL7wFBq0EdoCdMJ9TQ'\n\nexport const CK_EDITOR_LICENSE_KEY =\n 'eyJhbGciOiJFUzI1NiJ9.eyJleHAiOjE3NzQzOTY3OTksImp0aSI6ImEyOTVlM2M0LTdlNzMtNDBiNC1hNWI3LTZhNmNmNDFkYzlkNiIsImRpc3RyaWJ1dGlvbkNoYW5uZWwiOlsic2giLCJkcnVwYWwiXSwid2hpdGVMYWJlbCI6dHJ1ZSwiZmVhdHVyZXMiOlsiRFJVUCIsIkRPIiwiRlAiLCJTQyIsIlRPQyIsIlRQTCIsIlBPRSIsIkNDIiwiTUYiLCJTRUUiLCJFQ0giLCJFSVMiLCJNTEwiXSwidmMiOiI4MzU4Nzg0NyJ9.IP1OzVjd-e297egGXW2SnaAmQFl1flhb0kYSv1M4JlKkrmbcVhJLSHvtV5jiwVTegeBkSQZyO6r-1E4OJ-O76g'\n"],"mappings":"AAAA,OAAO,IAAMA,yBAAyB,GACpC,4bAA4b;AAE9b,OAAO,IAAMC,qBAAqB,GAChC,sZAAsZ"}
@@ -0,0 +1,99 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _regeneratorRuntime() { "use strict"; var r = _regenerator(), e = r.m(_regeneratorRuntime), t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; function n(r) { var e = "function" == typeof r && r.constructor; return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); } var o = { "throw": 1, "return": 2, "break": 3, "continue": 3 }; function a(r) { var e, t; return function (n) { e || (e = { stop: function stop() { return t(n.a, 2); }, "catch": function _catch() { return n.v; }, abrupt: function abrupt(r, e) { return t(n.a, o[r], e); }, delegateYield: function delegateYield(r, o, a) { return e.resultName = o, t(n.d, _regeneratorValues(r), a); }, finish: function finish(r) { return t(n.f, r); } }, t = function t(r, _t, o) { n.p = e.prev, n.n = e.next; try { return r(_t, o); } finally { e.next = n.n; } }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; try { return r.call(this, e); } finally { n.p = e.prev, n.n = e.next; } }; } return (_regeneratorRuntime = function _regeneratorRuntime() { return { wrap: function wrap(e, t, n, o) { return r.w(a(e), t, n, o && o.reverse()); }, isGeneratorFunction: n, mark: r.m, awrap: function awrap(r, e) { return new _OverloadYield(r, e); }, AsyncIterator: _regeneratorAsyncIterator, async: function async(r, e, t, o, u) { return (n(e) ? _regeneratorAsyncGen : _regeneratorAsync)(a(r), e, t, o, u); }, keys: _regeneratorKeys, values: _regeneratorValues }; })(); }
3
+ function _regeneratorValues(e) { if (null != e) { var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r = 0; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) return { next: function next() { return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e }; } }; } throw new TypeError(_typeof(e) + " is not iterable"); }
4
+ function _regeneratorKeys(e) { var n = Object(e), r = []; for (var t in n) r.unshift(t); return function e() { for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; return e.done = !0, e; }; }
5
+ function _regeneratorAsync(n, e, r, t, o) { var a = _regeneratorAsyncGen(n, e, r, t, o); return a.next().then(function (n) { return n.done ? n.value : a.next(); }); }
6
+ function _regeneratorAsyncGen(r, e, t, o, n) { return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise); }
7
+ function _regeneratorAsyncIterator(t, e) { function n(r, o, i, f) { try { var c = t[r](o), u = c.value; return u instanceof _OverloadYield ? e.resolve(u.v).then(function (t) { n("next", t, i, f); }, function (t) { n("throw", t, i, f); }) : e.resolve(u).then(function (t) { c.value = t, i(c); }, function (t) { return n("throw", t, i, f); }); } catch (t) { f(t); } } var r; this.next || (_regeneratorDefine2(_regeneratorAsyncIterator.prototype), _regeneratorDefine2(_regeneratorAsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { return this; })), _regeneratorDefine2(this, "_invoke", function (t, o, i) { function f() { return new e(function (e, r) { n(t, i, e, r); }); } return r = r ? r.then(f, f) : f(); }, !0); }
8
+ function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
9
+ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
10
+ function _OverloadYield(e, d) { this.v = e, this.k = d; }
11
+ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
12
+ function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
18
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
19
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
20
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
21
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
22
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
23
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
24
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
25
+ import { Command } from 'ckeditor5';
26
+ import sanitizeHtml from 'sanitize-html';
27
+ export var CutCommand = /*#__PURE__*/function (_Command) {
28
+ function CutCommand() {
29
+ _classCallCheck(this, CutCommand);
30
+ return _callSuper(this, CutCommand, arguments);
31
+ }
32
+ _inherits(CutCommand, _Command);
33
+ return _createClass(CutCommand, [{
34
+ key: "execute",
35
+ value: function () {
36
+ var _execute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
37
+ var model, selection, selectedContent, viewFragment, clipboardHtml;
38
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
39
+ while (1) switch (_context.prev = _context.next) {
40
+ case 0:
41
+ model = this.editor.model;
42
+ selection = model.document.selection;
43
+ if (!selection.isCollapsed) {
44
+ _context.next = 4;
45
+ break;
46
+ }
47
+ return _context.abrupt("return");
48
+ case 4:
49
+ // Get selected content
50
+ selectedContent = model.getSelectedContent(selection); // Convert to view fragment
51
+ viewFragment = this.editor.data.toView(selectedContent); // Convert view to HTML string using data processor
52
+ clipboardHtml = this.editor.data.processor.toData(viewFragment); // Copy to clipboard
53
+ if (!navigator.clipboard) {
54
+ _context.next = 16;
55
+ break;
56
+ }
57
+ _context.prev = 8;
58
+ _context.next = 11;
59
+ return navigator.clipboard.write([new ClipboardItem({
60
+ 'text/html': new Blob([clipboardHtml], {
61
+ type: 'text/html'
62
+ }),
63
+ 'text/plain': new Blob([sanitizeHtml(clipboardHtml, {
64
+ allowedTags: [],
65
+ allowedAttributes: {}
66
+ })], {
67
+ type: 'text/plain'
68
+ })
69
+ })]);
70
+ case 11:
71
+ _context.next = 16;
72
+ break;
73
+ case 13:
74
+ _context.prev = 13;
75
+ _context.t0 = _context["catch"](8);
76
+ console.warn('Failed to copy to clipboard:', _context.t0);
77
+ case 16:
78
+ // Delete selected content
79
+ model.deleteContent(selection);
80
+ case 17:
81
+ case "end":
82
+ return _context.stop();
83
+ }
84
+ }, _callee, this, [[8, 13]]);
85
+ }));
86
+ function execute() {
87
+ return _execute.apply(this, arguments);
88
+ }
89
+ return execute;
90
+ }()
91
+ }, {
92
+ key: "refresh",
93
+ value: function refresh() {
94
+ var selection = this.editor.model.document.selection;
95
+ this.isEnabled = !selection.isCollapsed;
96
+ }
97
+ }]);
98
+ }(Command);
99
+ //# sourceMappingURL=CutCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CutCommand.js","names":["e","t","r","Symbol","n","iterator","o","toStringTag","i","c","prototype","Generator","u","Object","create","_regeneratorDefine2","f","p","y","G","v","a","d","bind","length","l","TypeError","call","done","value","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","setPrototypeOf","__proto__","displayName","_regenerator","w","m","defineProperty","_regeneratorDefine","enumerable","configurable","writable","_invoke","_OverloadYield","k","asyncGeneratorStep","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","_classCallCheck","_defineProperties","_toPropertyKey","key","_createClass","_toPrimitive","_typeof","toPrimitive","String","Number","_callSuper","_getPrototypeOf","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","constructor","_assertThisInitialized","ReferenceError","Boolean","valueOf","_inherits","_setPrototypeOf","Command","sanitizeHtml","CutCommand","_Command","_execute","_regeneratorRuntime","mark","_callee","model","selection","selectedContent","viewFragment","clipboardHtml","wrap","_callee$","_context","prev","next","editor","document","isCollapsed","abrupt","getSelectedContent","data","toView","processor","toData","navigator","clipboard","write","ClipboardItem","Blob","type","allowedTags","allowedAttributes","t0","console","warn","deleteContent","stop","execute","refresh","isEnabled"],"sources":["../../../../src/TextEditor/plugins/CutPlugin/CutCommand.ts"],"sourcesContent":["import { Command } from 'ckeditor5'\nimport sanitizeHtml from 'sanitize-html'\n\nexport class CutCommand extends Command {\n async execute() {\n const model = this.editor.model\n const selection = model.document.selection\n\n if (selection.isCollapsed) {\n return\n }\n\n // Get selected content\n const selectedContent = model.getSelectedContent(selection)\n\n // Convert to view fragment\n const viewFragment = this.editor.data.toView(selectedContent)\n\n // Convert view to HTML string using data processor\n const clipboardHtml = this.editor.data.processor.toData(viewFragment)\n\n // Copy to clipboard\n if (navigator.clipboard) {\n try {\n await navigator.clipboard.write([\n new ClipboardItem({\n 'text/html': new Blob([clipboardHtml], { type: 'text/html' }),\n 'text/plain': new Blob(\n [\n sanitizeHtml(clipboardHtml, {\n allowedTags: [],\n allowedAttributes: {},\n }),\n ],\n {\n type: 'text/plain',\n }\n ),\n }),\n ])\n } catch (error) {\n console.warn('Failed to copy to clipboard:', error)\n }\n }\n\n // Delete selected content\n model.deleteContent(selection)\n }\n\n refresh() {\n const selection = this.editor.model.document.selection\n this.isEnabled = !selection.isCollapsed\n }\n}\n"],"mappings":";;;;;;;0BACA,uKAAAA,CAAA,EAAAC,CAAA,EAAAC,CAAA,wBAAAC,MAAA,GAAAA,MAAA,OAAAC,CAAA,GAAAF,CAAA,CAAAG,QAAA,kBAAAC,CAAA,GAAAJ,CAAA,CAAAK,WAAA,8BAAAC,EAAAN,CAAA,EAAAE,CAAA,EAAAE,CAAA,EAAAE,CAAA,QAAAC,CAAA,GAAAL,CAAA,IAAAA,CAAA,CAAAM,SAAA,YAAAC,SAAA,GAAAP,CAAA,GAAAO,SAAA,EAAAC,CAAA,GAAAC,MAAA,CAAAC,MAAA,CAAAL,CAAA,CAAAC,SAAA,UAAAK,mBAAA,CAAAH,CAAA,uBAAAV,CAAA,EAAAE,CAAA,EAAAE,CAAA,QAAAE,CAAA,EAAAC,CAAA,EAAAG,CAAA,EAAAI,CAAA,MAAAC,CAAA,GAAAX,CAAA,QAAAY,CAAA,OAAAC,CAAA,KAAAF,CAAA,KAAAb,CAAA,KAAAgB,CAAA,EAAApB,CAAA,EAAAqB,CAAA,EAAAC,CAAA,EAAAN,CAAA,EAAAM,CAAA,CAAAC,IAAA,CAAAvB,CAAA,MAAAsB,CAAA,WAAAA,EAAArB,CAAA,EAAAC,CAAA,WAAAM,CAAA,GAAAP,CAAA,EAAAQ,CAAA,MAAAG,CAAA,GAAAZ,CAAA,EAAAmB,CAAA,CAAAf,CAAA,GAAAF,CAAA,EAAAmB,CAAA,gBAAAC,EAAApB,CAAA,EAAAE,CAAA,SAAAK,CAAA,GAAAP,CAAA,EAAAU,CAAA,GAAAR,CAAA,EAAAH,CAAA,OAA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1,56 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
3
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
4
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
9
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
10
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
12
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
13
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
14
+ import { ButtonView, Plugin } from 'ckeditor5';
15
+ import { CutCommand } from './CutCommand';
16
+ export var CutPlugin = /*#__PURE__*/function (_Plugin) {
17
+ function CutPlugin() {
18
+ _classCallCheck(this, CutPlugin);
19
+ return _callSuper(this, CutPlugin, arguments);
20
+ }
21
+ _inherits(CutPlugin, _Plugin);
22
+ return _createClass(CutPlugin, [{
23
+ key: "init",
24
+ value: function init() {
25
+ var editor = this.editor;
26
+
27
+ // Add the cut command
28
+ editor.commands.add('cut', new CutCommand(editor));
29
+
30
+ // Add the cut button to the toolbar
31
+ editor.ui.componentFactory.add('cut', function (locale) {
32
+ var _global$window$CKEDIT, _global$window$CKEDIT2;
33
+ var command = editor.commands.get('cut');
34
+ var buttonView = new ButtonView(locale);
35
+ buttonView.set({
36
+ label: (_global$window$CKEDIT = global.window.CKEDITOR_TRANSLATIONS[locale.contentLanguage]) === null || _global$window$CKEDIT === void 0 ? void 0 : (_global$window$CKEDIT2 = _global$window$CKEDIT.dictionary) === null || _global$window$CKEDIT2 === void 0 ? void 0 : _global$window$CKEDIT2.Cut,
37
+ icon: '<svg></svg>',
38
+ tooltip: true
39
+ });
40
+ if (command) {
41
+ buttonView.bind('isEnabled').to(command, 'isEnabled');
42
+ }
43
+ buttonView.on('execute', function () {
44
+ editor.execute('cut');
45
+ });
46
+ return buttonView;
47
+ });
48
+ }
49
+ }], [{
50
+ key: "pluginName",
51
+ get: function get() {
52
+ return 'Cut';
53
+ }
54
+ }]);
55
+ }(Plugin);
56
+ //# sourceMappingURL=CutPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CutPlugin.js","names":["ButtonView","Plugin","CutCommand","CutPlugin","_Plugin","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","init","editor","commands","add","ui","componentFactory","locale","_global$window$CKEDIT","_global$window$CKEDIT2","command","get","buttonView","set","label","global","window","CKEDITOR_TRANSLATIONS","contentLanguage","dictionary","Cut","icon","tooltip","bind","to","on","execute"],"sources":["../../../../src/TextEditor/plugins/CutPlugin/CutPlugin.ts"],"sourcesContent":["import { ButtonView, Plugin } from 'ckeditor5'\nimport { CutCommand } from './CutCommand'\n\nexport class CutPlugin extends Plugin {\n static get pluginName() {\n return 'Cut'\n }\n\n init() {\n const editor = this.editor\n\n // Add the cut command\n editor.commands.add('cut', new CutCommand(editor))\n\n // Add the cut button to the toolbar\n editor.ui.componentFactory.add('cut', (locale) => {\n const command = editor.commands.get('cut')\n const buttonView = new ButtonView(locale)\n buttonView.set({\n label:\n global.window.CKEDITOR_TRANSLATIONS[locale.contentLanguage]\n ?.dictionary?.Cut,\n icon: '<svg></svg>',\n tooltip: true,\n })\n\n if (command) {\n buttonView.bind('isEnabled').to(command, 'isEnabled')\n }\n\n buttonView.on('execute', () => {\n editor.execute('cut')\n })\n\n return buttonView\n })\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,SAASA,UAAU,EAAEC,MAAM,QAAQ,WAAW;AAC9C,SAASC,UAAU,QAAQ,cAAc;AAEzC,WAAaC,SAAS,0BAAAC,OAAA;EAAA,SAAAD,UAAA;IAAAE,eAAA,OAAAF,SAAA;IAAA,OAAAG,UAAA,OAAAH,SAAA,EAAAI,SAAA;EAAA;EAAAC,SAAA,CAAAL,SAAA,EAAAC,OAAA;EAAA,OAAAK,YAAA,CAAAN,SAAA;IAAAO,GAAA;IAAAC,KAAA,EAKpB,SAAAC,IAAIA,CAAA,EAAG;MACL,IAAMC,MAAM,GAAG,IAAI,CAACA,MAAM;;MAE1B;MACAA,MAAM,CAACC,QAAQ,CAACC,GAAG,CAAC,KAAK,EAAE,IAAIb,UAAU,CAACW,MAAM,CAAC,CAAC;;MAElD;MACAA,MAAM,CAACG,EAAE,CAACC,gBAAgB,CAACF,GAAG,CAAC,KAAK,EAAE,UAACG,MAAM,EAAK;QAAA,IAAAC,qBAAA,EAAAC,sBAAA;QAChD,IAAMC,OAAO,GAAGR,MAAM,CAACC,QAAQ,CAACQ,GAAG,CAAC,KAAK,CAAC;QAC1C,IAAMC,UAAU,GAAG,IAAIvB,UAAU,CAACkB,MAAM,CAAC;QACzCK,UAAU,CAACC,GAAG,CAAC;UACbC,KAAK,GAAAN,qBAAA,GACHO,MAAM,CAACC,MAAM,CAACC,qBAAqB,CAACV,MAAM,CAACW,eAAe,CAAC,cAAAV,qBAAA,wBAAAC,sBAAA,GAA3DD,qBAAA,CACIW,UAAU,cAAAV,sBAAA,uBADdA,sBAAA,CACgBW,GAAG;UACrBC,IAAI,EAAE,aAAa;UACnBC,OAAO,EAAE;QACX,CAAC,CAAC;QAEF,IAAIZ,OAAO,EAAE;UACXE,UAAU,CAACW,IAAI,CAAC,WAAW,CAAC,CAACC,EAAE,CAACd,OAAO,EAAE,WAAW,CAAC;QACvD;QAEAE,UAAU,CAACa,EAAE,CAAC,SAAS,EAAE,YAAM;UAC7BvB,MAAM,CAACwB,OAAO,CAAC,KAAK,CAAC;QACvB,CAAC,CAAC;QAEF,OAAOd,UAAU;MACnB,CAAC,CAAC;IACJ;EAAC;IAAAb,GAAA;IAAAY,GAAA,EAhCD,SAAAA,IAAA,EAAwB;MACtB,OAAO,KAAK;IACd;EAAC;AAAA,EAH4BrB,MAAM"}
@@ -0,0 +1,2 @@
1
+ export * from './CutPlugin';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/TextEditor/plugins/CutPlugin/index.ts"],"sourcesContent":["export * from './CutPlugin'\n"],"mappings":"AAAA,cAAc,aAAa"}
@@ -0,0 +1,40 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
3
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
4
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
9
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
10
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
12
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
13
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
14
+ import { Plugin } from 'ckeditor5';
15
+
16
+ // Convert paragraph padding-left to margin-left to maintain compatibility with legacy editor output
17
+ export var IndentPaddingToMarginPlugin = /*#__PURE__*/function (_Plugin) {
18
+ function IndentPaddingToMarginPlugin() {
19
+ _classCallCheck(this, IndentPaddingToMarginPlugin);
20
+ return _callSuper(this, IndentPaddingToMarginPlugin, arguments);
21
+ }
22
+ _inherits(IndentPaddingToMarginPlugin, _Plugin);
23
+ return _createClass(IndentPaddingToMarginPlugin, [{
24
+ key: "init",
25
+ value: function init() {
26
+ var editor = this.editor;
27
+ var originalToView = editor.data.processor.toView.bind(editor.data.processor);
28
+ editor.data.processor.toView = function (data) {
29
+ var convertedData = data.replace(/<p([^>]*style="[^"]*?)padding-left:\s*([^;]+)(;?)([^"]*"[^>]*>)/gi, '<p$1margin-left: $2$3$4');
30
+ return originalToView(convertedData);
31
+ };
32
+ }
33
+ }], [{
34
+ key: "pluginName",
35
+ get: function get() {
36
+ return 'IndentPaddingToMargin';
37
+ }
38
+ }]);
39
+ }(Plugin);
40
+ //# sourceMappingURL=IndentPaddingToMarginPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IndentPaddingToMarginPlugin.js","names":["Plugin","IndentPaddingToMarginPlugin","_Plugin","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","init","editor","originalToView","data","processor","toView","bind","convertedData","replace","get"],"sources":["../../../../src/TextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.ts"],"sourcesContent":["import { Plugin } from 'ckeditor5'\n\n// Convert paragraph padding-left to margin-left to maintain compatibility with legacy editor output\nexport class IndentPaddingToMarginPlugin extends Plugin {\n static get pluginName() {\n return 'IndentPaddingToMargin'\n }\n\n init() {\n const editor = this.editor\n const originalToView = editor.data.processor.toView.bind(\n editor.data.processor\n )\n editor.data.processor.toView = (data: string) => {\n const convertedData = data.replace(\n /<p([^>]*style=\"[^\"]*?)padding-left:\\s*([^;]+)(;?)([^\"]*\"[^>]*>)/gi,\n '<p$1margin-left: $2$3$4'\n )\n return originalToView(convertedData)\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,SAASA,MAAM,QAAQ,WAAW;;AAElC;AACA,WAAaC,2BAA2B,0BAAAC,OAAA;EAAA,SAAAD,4BAAA;IAAAE,eAAA,OAAAF,2BAAA;IAAA,OAAAG,UAAA,OAAAH,2BAAA,EAAAI,SAAA;EAAA;EAAAC,SAAA,CAAAL,2BAAA,EAAAC,OAAA;EAAA,OAAAK,YAAA,CAAAN,2BAAA;IAAAO,GAAA;IAAAC,KAAA,EAKtC,SAAAC,IAAIA,CAAA,EAAG;MACL,IAAMC,MAAM,GAAG,IAAI,CAACA,MAAM;MAC1B,IAAMC,cAAc,GAAGD,MAAM,CAACE,IAAI,CAACC,SAAS,CAACC,MAAM,CAACC,IAAI,CACtDL,MAAM,CAACE,IAAI,CAACC,SACd,CAAC;MACDH,MAAM,CAACE,IAAI,CAACC,SAAS,CAACC,MAAM,GAAG,UAACF,IAAY,EAAK;QAC/C,IAAMI,aAAa,GAAGJ,IAAI,CAACK,OAAO,CAChC,mEAAmE,EACnE,yBACF,CAAC;QACD,OAAON,cAAc,CAACK,aAAa,CAAC;MACtC,CAAC;IACH;EAAC;IAAAT,GAAA;IAAAW,GAAA,EAhBD,SAAAA,IAAA,EAAwB;MACtB,OAAO,uBAAuB;IAChC;EAAC;AAAA,EAH8CnB,MAAM"}
@@ -0,0 +1,2 @@
1
+ export * from './IndentPaddingToMarginPlugin';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/TextEditor/plugins/IndentPaddingToMarginPlugin/index.ts"],"sourcesContent":["export * from './IndentPaddingToMarginPlugin'\n"],"mappings":"AAAA,cAAc,+BAA+B"}
@@ -0,0 +1,86 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _regeneratorRuntime() { "use strict"; var r = _regenerator(), e = r.m(_regeneratorRuntime), t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; function n(r) { var e = "function" == typeof r && r.constructor; return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); } var o = { "throw": 1, "return": 2, "break": 3, "continue": 3 }; function a(r) { var e, t; return function (n) { e || (e = { stop: function stop() { return t(n.a, 2); }, "catch": function _catch() { return n.v; }, abrupt: function abrupt(r, e) { return t(n.a, o[r], e); }, delegateYield: function delegateYield(r, o, a) { return e.resultName = o, t(n.d, _regeneratorValues(r), a); }, finish: function finish(r) { return t(n.f, r); } }, t = function t(r, _t, o) { n.p = e.prev, n.n = e.next; try { return r(_t, o); } finally { e.next = n.n; } }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; try { return r.call(this, e); } finally { n.p = e.prev, n.n = e.next; } }; } return (_regeneratorRuntime = function _regeneratorRuntime() { return { wrap: function wrap(e, t, n, o) { return r.w(a(e), t, n, o && o.reverse()); }, isGeneratorFunction: n, mark: r.m, awrap: function awrap(r, e) { return new _OverloadYield(r, e); }, AsyncIterator: _regeneratorAsyncIterator, async: function async(r, e, t, o, u) { return (n(e) ? _regeneratorAsyncGen : _regeneratorAsync)(a(r), e, t, o, u); }, keys: _regeneratorKeys, values: _regeneratorValues }; })(); }
3
+ function _regeneratorValues(e) { if (null != e) { var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r = 0; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) return { next: function next() { return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e }; } }; } throw new TypeError(_typeof(e) + " is not iterable"); }
4
+ function _regeneratorKeys(e) { var n = Object(e), r = []; for (var t in n) r.unshift(t); return function e() { for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; return e.done = !0, e; }; }
5
+ function _regeneratorAsync(n, e, r, t, o) { var a = _regeneratorAsyncGen(n, e, r, t, o); return a.next().then(function (n) { return n.done ? n.value : a.next(); }); }
6
+ function _regeneratorAsyncGen(r, e, t, o, n) { return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise); }
7
+ function _regeneratorAsyncIterator(t, e) { function n(r, o, i, f) { try { var c = t[r](o), u = c.value; return u instanceof _OverloadYield ? e.resolve(u.v).then(function (t) { n("next", t, i, f); }, function (t) { n("throw", t, i, f); }) : e.resolve(u).then(function (t) { c.value = t, i(c); }, function (t) { return n("throw", t, i, f); }); } catch (t) { f(t); } } var r; this.next || (_regeneratorDefine2(_regeneratorAsyncIterator.prototype), _regeneratorDefine2(_regeneratorAsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { return this; })), _regeneratorDefine2(this, "_invoke", function (t, o, i) { function f() { return new e(function (e, r) { n(t, i, e, r); }); } return r = r ? r.then(f, f) : f(); }, !0); }
8
+ function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
9
+ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
10
+ function _OverloadYield(e, d) { this.v = e, this.k = d; }
11
+ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
12
+ function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
18
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
19
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
20
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
21
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
22
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
23
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
24
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
25
+ import { Command } from 'ckeditor5';
26
+ export var PasteAsTextCommand = /*#__PURE__*/function (_Command) {
27
+ function PasteAsTextCommand() {
28
+ _classCallCheck(this, PasteAsTextCommand);
29
+ return _callSuper(this, PasteAsTextCommand, arguments);
30
+ }
31
+ _inherits(PasteAsTextCommand, _Command);
32
+ return _createClass(PasteAsTextCommand, [{
33
+ key: "execute",
34
+ value: function () {
35
+ var _execute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
36
+ var editor, plainText;
37
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
38
+ while (1) switch (_context.prev = _context.next) {
39
+ case 0:
40
+ editor = this.editor;
41
+ _context.prev = 1;
42
+ if (!(navigator.clipboard && navigator.clipboard.readText)) {
43
+ _context.next = 9;
44
+ break;
45
+ }
46
+ _context.next = 5;
47
+ return navigator.clipboard.readText();
48
+ case 5:
49
+ plainText = _context.sent;
50
+ if (plainText) {
51
+ // Insert as plain text without any formatting
52
+ editor.model.change(function (writer) {
53
+ var textNode = writer.createText(plainText);
54
+ editor.model.insertContent(textNode);
55
+ });
56
+ }
57
+ _context.next = 10;
58
+ break;
59
+ case 9:
60
+ console.warn('Clipboard API not available');
61
+ case 10:
62
+ _context.next = 15;
63
+ break;
64
+ case 12:
65
+ _context.prev = 12;
66
+ _context.t0 = _context["catch"](1);
67
+ console.warn('Clipboard API not available for text reading');
68
+ case 15:
69
+ case "end":
70
+ return _context.stop();
71
+ }
72
+ }, _callee, this, [[1, 12]]);
73
+ }));
74
+ function execute() {
75
+ return _execute.apply(this, arguments);
76
+ }
77
+ return execute;
78
+ }()
79
+ }, {
80
+ key: "refresh",
81
+ value: function refresh() {
82
+ this.isEnabled = true;
83
+ }
84
+ }]);
85
+ }(Command);
86
+ //# sourceMappingURL=PasteAsTextCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasteAsTextCommand.js","names":["e","t","r","Symbol","n","iterator","o","toStringTag","i","c","prototype","Generator","u","Object","create","_regeneratorDefine2","f","p","y","G","v","a","d","bind","length","l","TypeError","call","done","value","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","setPrototypeOf","__proto__","displayName","_regenerator","w","m","defineProperty","_regeneratorDefine","enumerable","configurable","writable","_invoke","_OverloadYield","k","asyncGeneratorStep","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","_classCallCheck","_defineProperties","_toPropertyKey","key","_createClass","_toPrimitive","_typeof","toPrimitive","String","Number","_callSuper","_getPrototypeOf","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","constructor","_assertThisInitialized","ReferenceError","Boolean","valueOf","_inherits","_setPrototypeOf","Command","PasteAsTextCommand","_Command","_execute","_regeneratorRuntime","mark","_callee","editor","plainText","wrap","_callee$","_context","prev","next","navigator","clipboard","readText","sent","model","change","writer","textNode","createText","insertContent","console","warn","t0","stop","execute","refresh","isEnabled"],"sources":["../../../../src/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.ts"],"sourcesContent":["import { Command } from 'ckeditor5'\n\nexport class PasteAsTextCommand extends Command {\n async execute() {\n const editor = this.editor\n\n try {\n if (navigator.clipboard && navigator.clipboard.readText) {\n const plainText = await navigator.clipboard.readText()\n\n if (plainText) {\n // Insert as plain text without any formatting\n editor.model.change((writer: any) => {\n const textNode = writer.createText(plainText)\n editor.model.insertContent(textNode)\n })\n }\n } else {\n console.warn('Clipboard API not available')\n }\n } catch (error) {\n console.warn('Clipboard API not available for text reading')\n }\n }\n\n refresh() {\n this.isEnabled = true\n }\n}\n"],"mappings":";;;;;;;0BACA,uKAAAA,CAAA,EAAAC,CAAA,EAAAC,CAAA,wBAAAC,MAAA,GAAAA,MAAA,OAAAC,CAAA,GAAAF,CAAA,CAAAG,QAAA,kBAAAC,CAAA,GAAAJ,CAAA,CAAAK,WAAA,8BAAAC,EAAAN,CAAA,EAAAE,CAAA,EAAAE,CAAA,EAAAE,CAAA,QAAAC,CAAA,GAAAL,CAAA,IAAAA,CAAA,CAAAM,SAAA,YAAAC,SAAA,GAAAP,CAAA,GAAAO,SAAA,EAAAC,CAAA,GAAAC,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B,OAAO"}
@@ -0,0 +1,56 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
3
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
4
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
9
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
10
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
12
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
13
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
14
+ import { ButtonView, Plugin } from 'ckeditor5';
15
+ import { PasteAsTextCommand } from './PasteAsTextCommand';
16
+ export var PasteAsTextPlugin = /*#__PURE__*/function (_Plugin) {
17
+ function PasteAsTextPlugin() {
18
+ _classCallCheck(this, PasteAsTextPlugin);
19
+ return _callSuper(this, PasteAsTextPlugin, arguments);
20
+ }
21
+ _inherits(PasteAsTextPlugin, _Plugin);
22
+ return _createClass(PasteAsTextPlugin, [{
23
+ key: "init",
24
+ value: function init() {
25
+ var editor = this.editor;
26
+
27
+ // Add the paste as text command
28
+ editor.commands.add('pasteAsText', new PasteAsTextCommand(editor));
29
+
30
+ // Add the paste as text button to the toolbar
31
+ editor.ui.componentFactory.add('pasteAsText', function (locale) {
32
+ var _global$window$CKEDIT, _global$window$CKEDIT2;
33
+ var command = editor.commands.get('pasteAsText');
34
+ var buttonView = new ButtonView(locale);
35
+ buttonView.set({
36
+ label: (_global$window$CKEDIT = global.window.CKEDITOR_TRANSLATIONS[locale.contentLanguage]) === null || _global$window$CKEDIT === void 0 ? void 0 : (_global$window$CKEDIT2 = _global$window$CKEDIT.dictionary) === null || _global$window$CKEDIT2 === void 0 ? void 0 : _global$window$CKEDIT2.PasteAsText,
37
+ icon: '<svg></svg>',
38
+ tooltip: true
39
+ });
40
+ if (command) {
41
+ buttonView.bind('isEnabled').to(command, 'isEnabled');
42
+ }
43
+ buttonView.on('execute', function () {
44
+ editor.execute('pasteAsText');
45
+ });
46
+ return buttonView;
47
+ });
48
+ }
49
+ }], [{
50
+ key: "pluginName",
51
+ get: function get() {
52
+ return 'PasteAsText';
53
+ }
54
+ }]);
55
+ }(Plugin);
56
+ //# sourceMappingURL=PasteAsTextPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasteAsTextPlugin.js","names":["ButtonView","Plugin","PasteAsTextCommand","PasteAsTextPlugin","_Plugin","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","init","editor","commands","add","ui","componentFactory","locale","_global$window$CKEDIT","_global$window$CKEDIT2","command","get","buttonView","set","label","global","window","CKEDITOR_TRANSLATIONS","contentLanguage","dictionary","PasteAsText","icon","tooltip","bind","to","on","execute"],"sources":["../../../../src/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.ts"],"sourcesContent":["import { ButtonView, Plugin } from 'ckeditor5'\nimport { PasteAsTextCommand } from './PasteAsTextCommand'\n\nexport class PasteAsTextPlugin extends Plugin {\n static get pluginName() {\n return 'PasteAsText'\n }\n\n init() {\n const editor = this.editor\n\n // Add the paste as text command\n editor.commands.add('pasteAsText', new PasteAsTextCommand(editor))\n\n // Add the paste as text button to the toolbar\n editor.ui.componentFactory.add('pasteAsText', (locale) => {\n const command = editor.commands.get('pasteAsText')\n const buttonView = new ButtonView(locale)\n\n buttonView.set({\n label:\n global.window.CKEDITOR_TRANSLATIONS[locale.contentLanguage]\n ?.dictionary?.PasteAsText,\n icon: '<svg></svg>',\n tooltip: true,\n })\n\n if (command) {\n buttonView.bind('isEnabled').to(command, 'isEnabled')\n }\n\n buttonView.on('execute', () => {\n editor.execute('pasteAsText')\n })\n\n return buttonView\n })\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,SAASA,UAAU,EAAEC,MAAM,QAAQ,WAAW;AAC9C,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,WAAaC,iBAAiB,0BAAAC,OAAA;EAAA,SAAAD,kBAAA;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AAAA,IAAA,EAAwB;MACtB,OAAO,aAAa;IACtB;EAAC;AAAA,EAHoCrB,MAAM"}
@@ -0,0 +1,2 @@
1
+ export * from './PasteAsTextPlugin';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/TextEditor/plugins/PasteAsTextPlugin/index.ts"],"sourcesContent":["export * from './PasteAsTextPlugin'\n"],"mappings":"AAAA,cAAc,qBAAqB"}