@webiny/lexical-editor 5.40.0-beta.1 → 5.40.0-beta.3

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 (194) hide show
  1. package/commands/image.js +1 -2
  2. package/commands/image.js.map +1 -1
  3. package/commands/index.js.map +1 -1
  4. package/commands/list.js +3 -6
  5. package/commands/list.js.map +1 -1
  6. package/commands/quote.js +1 -2
  7. package/commands/quote.js.map +1 -1
  8. package/components/Editor/HeadingEditor.d.ts +2 -2
  9. package/components/Editor/HeadingEditor.js +1 -2
  10. package/components/Editor/HeadingEditor.js.map +1 -1
  11. package/components/Editor/ParagraphEditor.d.ts +2 -2
  12. package/components/Editor/ParagraphEditor.js +1 -2
  13. package/components/Editor/ParagraphEditor.js.map +1 -1
  14. package/components/Editor/RichTextEditor.d.ts +3 -2
  15. package/components/Editor/RichTextEditor.js +16 -32
  16. package/components/Editor/RichTextEditor.js.map +1 -1
  17. package/components/LexicalEditorConfig/LexicalEditorConfig.d.ts +5 -5
  18. package/components/LexicalEditorConfig/LexicalEditorConfig.js +2 -4
  19. package/components/LexicalEditorConfig/LexicalEditorConfig.js.map +1 -1
  20. package/components/LexicalEditorConfig/components/Node.d.ts +2 -2
  21. package/components/LexicalEditorConfig/components/Node.js +1 -2
  22. package/components/LexicalEditorConfig/components/Node.js.map +1 -1
  23. package/components/LexicalEditorConfig/components/Plugin.d.ts +1 -1
  24. package/components/LexicalEditorConfig/components/Plugin.js +1 -2
  25. package/components/LexicalEditorConfig/components/Plugin.js.map +1 -1
  26. package/components/LexicalEditorConfig/components/ToolbarElement.d.ts +1 -1
  27. package/components/LexicalEditorConfig/components/ToolbarElement.js +1 -2
  28. package/components/LexicalEditorConfig/components/ToolbarElement.js.map +1 -1
  29. package/components/LexicalHtmlRenderer.d.ts +2 -6
  30. package/components/LexicalHtmlRenderer.js +13 -21
  31. package/components/LexicalHtmlRenderer.js.map +1 -1
  32. package/components/Toolbar/StaticToolbar.css +1 -1
  33. package/components/Toolbar/StaticToolbar.d.ts +2 -2
  34. package/components/Toolbar/StaticToolbar.js +4 -8
  35. package/components/Toolbar/StaticToolbar.js.map +1 -1
  36. package/components/Toolbar/Toolbar.css +73 -72
  37. package/components/Toolbar/Toolbar.js +19 -7
  38. package/components/Toolbar/Toolbar.js.map +1 -1
  39. package/components/ToolbarActions/BoldAction.d.ts +2 -2
  40. package/components/ToolbarActions/BoldAction.js +4 -7
  41. package/components/ToolbarActions/BoldAction.js.map +1 -1
  42. package/components/ToolbarActions/BulletListAction.d.ts +2 -2
  43. package/components/ToolbarActions/BulletListAction.js +6 -10
  44. package/components/ToolbarActions/BulletListAction.js.map +1 -1
  45. package/components/ToolbarActions/CodeHighlightAction.d.ts +2 -2
  46. package/components/ToolbarActions/CodeHighlightAction.js +4 -7
  47. package/components/ToolbarActions/CodeHighlightAction.js.map +1 -1
  48. package/components/ToolbarActions/FontColorAction.d.ts +2 -1
  49. package/components/ToolbarActions/FontColorAction.js +5 -10
  50. package/components/ToolbarActions/FontColorAction.js.map +1 -1
  51. package/components/ToolbarActions/FontSizeAction.d.ts +2 -2
  52. package/components/ToolbarActions/FontSizeAction.js +4 -6
  53. package/components/ToolbarActions/FontSizeAction.js.map +1 -1
  54. package/components/ToolbarActions/ImageAction.d.ts +2 -2
  55. package/components/ToolbarActions/ImageAction.js +2 -6
  56. package/components/ToolbarActions/ImageAction.js.map +1 -1
  57. package/components/ToolbarActions/ItalicAction.d.ts +2 -2
  58. package/components/ToolbarActions/ItalicAction.js +4 -7
  59. package/components/ToolbarActions/ItalicAction.js.map +1 -1
  60. package/components/ToolbarActions/LinkAction.d.ts +2 -2
  61. package/components/ToolbarActions/LinkAction.js +4 -8
  62. package/components/ToolbarActions/LinkAction.js.map +1 -1
  63. package/components/ToolbarActions/NumberedListAction.d.ts +2 -2
  64. package/components/ToolbarActions/NumberedListAction.js +2 -7
  65. package/components/ToolbarActions/NumberedListAction.js.map +1 -1
  66. package/components/ToolbarActions/QuoteAction.d.ts +2 -2
  67. package/components/ToolbarActions/QuoteAction.js +2 -7
  68. package/components/ToolbarActions/QuoteAction.js.map +1 -1
  69. package/components/ToolbarActions/TextAlignmentAction.d.ts +2 -1
  70. package/components/ToolbarActions/TextAlignmentAction.js +5 -10
  71. package/components/ToolbarActions/TextAlignmentAction.js.map +1 -1
  72. package/components/ToolbarActions/TypographyAction.d.ts +2 -1
  73. package/components/ToolbarActions/TypographyAction.js +3 -8
  74. package/components/ToolbarActions/TypographyAction.js.map +1 -1
  75. package/components/ToolbarActions/UnderlineAction.d.ts +2 -2
  76. package/components/ToolbarActions/UnderlineAction.js +5 -9
  77. package/components/ToolbarActions/UnderlineAction.js.map +1 -1
  78. package/context/FontColorActionContext.js +1 -2
  79. package/context/FontColorActionContext.js.map +1 -1
  80. package/context/RichTextEditorContext.d.ts +6 -11
  81. package/context/RichTextEditorContext.js +13 -39
  82. package/context/RichTextEditorContext.js.map +1 -1
  83. package/context/SharedHistoryContext.js +7 -8
  84. package/context/SharedHistoryContext.js.map +1 -1
  85. package/context/TextAlignmentActionContextProps.js +1 -2
  86. package/context/TextAlignmentActionContextProps.js.map +1 -1
  87. package/context/TypographyActionContext.js +1 -2
  88. package/context/TypographyActionContext.js.map +1 -1
  89. package/hooks/index.d.ts +1 -0
  90. package/hooks/index.js +11 -0
  91. package/hooks/index.js.map +1 -1
  92. package/hooks/useCurrentElement.js.map +1 -1
  93. package/hooks/useCurrentSelection.js +5 -7
  94. package/hooks/useCurrentSelection.js.map +1 -1
  95. package/hooks/useFontColorPicker.js.map +1 -1
  96. package/hooks/useIsMounted.js.map +1 -1
  97. package/hooks/useList.js.map +1 -1
  98. package/hooks/useQuote.js.map +1 -1
  99. package/hooks/useRichTextEditor.js.map +1 -1
  100. package/hooks/useTextAlignmentAction.js.map +1 -1
  101. package/hooks/useTypographyAction.js.map +1 -1
  102. package/index.d.ts +1 -1
  103. package/index.js +2 -2
  104. package/index.js.map +1 -1
  105. package/package.json +12 -10
  106. package/plugins/BlurEventPlugin/BlurEventPlugin.js +4 -8
  107. package/plugins/BlurEventPlugin/BlurEventPlugin.js.map +1 -1
  108. package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.js +3 -6
  109. package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.js.map +1 -1
  110. package/plugins/CodeHighlightPlugin/index.js.map +1 -1
  111. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.css +58 -5
  112. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.d.ts +14 -1
  113. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.js +60 -141
  114. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.js.map +1 -1
  115. package/plugins/FloatingLinkEditorPlugin/LinkEditForm.d.ts +9 -0
  116. package/plugins/FloatingLinkEditorPlugin/LinkEditForm.js +118 -0
  117. package/plugins/FloatingLinkEditorPlugin/LinkEditForm.js.map +1 -0
  118. package/plugins/FloatingLinkEditorPlugin/LinkPreviewForm.d.ts +9 -0
  119. package/plugins/FloatingLinkEditorPlugin/LinkPreviewForm.js +44 -0
  120. package/plugins/FloatingLinkEditorPlugin/LinkPreviewForm.js.map +1 -0
  121. package/plugins/FloatingLinkEditorPlugin/index.js.map +1 -1
  122. package/plugins/FloatingLinkEditorPlugin/isChildOfLinkEditor.d.ts +1 -0
  123. package/plugins/FloatingLinkEditorPlugin/isChildOfLinkEditor.js +18 -0
  124. package/plugins/FloatingLinkEditorPlugin/isChildOfLinkEditor.js.map +1 -0
  125. package/plugins/FloatingLinkEditorPlugin/useFloatingLinkEditor.d.ts +2 -0
  126. package/plugins/FloatingLinkEditorPlugin/useFloatingLinkEditor.js +72 -0
  127. package/plugins/FloatingLinkEditorPlugin/useFloatingLinkEditor.js.map +1 -0
  128. package/plugins/FontColorPlugin/FontColorPlugin.js +4 -8
  129. package/plugins/FontColorPlugin/FontColorPlugin.js.map +1 -1
  130. package/plugins/ImagesPlugin/ImagesPlugin.js +4 -7
  131. package/plugins/ImagesPlugin/ImagesPlugin.js.map +1 -1
  132. package/plugins/LexicalUpdateStatePlugin/UpdateStatePlugin.d.ts +1 -1
  133. package/plugins/LexicalUpdateStatePlugin/UpdateStatePlugin.js +5 -9
  134. package/plugins/LexicalUpdateStatePlugin/UpdateStatePlugin.js.map +1 -1
  135. package/plugins/LexicalUpdateStatePlugin/index.js.map +1 -1
  136. package/plugins/LinkPlugin/LinkPlugin.js +4 -6
  137. package/plugins/LinkPlugin/LinkPlugin.js.map +1 -1
  138. package/plugins/ListPLugin/ListPlugin.js +5 -9
  139. package/plugins/ListPLugin/ListPlugin.js.map +1 -1
  140. package/plugins/QuoteNodePlugin/QuoteNodePlugin.js +23 -0
  141. package/plugins/QuoteNodePlugin/QuoteNodePlugin.js.map +1 -0
  142. package/plugins/TypographyPlugin/TypographyPlugin.js +4 -8
  143. package/plugins/TypographyPlugin/TypographyPlugin.js.map +1 -1
  144. package/types.js.map +1 -1
  145. package/ui/ContentEditable.js.map +1 -1
  146. package/ui/Divider.js.map +1 -1
  147. package/ui/DropDown.d.ts +1 -1
  148. package/ui/DropDown.js +16 -15
  149. package/ui/DropDown.js.map +1 -1
  150. package/ui/ImageResizer.js +5 -4
  151. package/ui/ImageResizer.js.map +1 -1
  152. package/ui/LinkPreview.js +3 -2
  153. package/ui/LinkPreview.js.map +1 -1
  154. package/ui/Placeholder.js.map +1 -1
  155. package/ui/TextInput.js.map +1 -1
  156. package/ui/ToolbarActionDialog.d.ts +2 -3
  157. package/ui/ToolbarActionDialog.js +13 -32
  158. package/ui/ToolbarActionDialog.js.map +1 -1
  159. package/utils/canUseDOM.js +1 -2
  160. package/utils/canUseDOM.js.map +1 -1
  161. package/utils/files.js +2 -4
  162. package/utils/files.js.map +1 -1
  163. package/utils/generateInitialLexicalValue.js +1 -2
  164. package/utils/generateInitialLexicalValue.js.map +1 -1
  165. package/utils/getDOMRangeRect.js.map +1 -1
  166. package/utils/getSelectedNode.js.map +1 -1
  167. package/utils/getTransparentImage.js +1 -2
  168. package/utils/getTransparentImage.js.map +1 -1
  169. package/utils/insertImage.js +1 -2
  170. package/utils/insertImage.js.map +1 -1
  171. package/utils/isAnchorLink.d.ts +1 -0
  172. package/utils/isAnchorLink.js +11 -0
  173. package/utils/isAnchorLink.js.map +1 -0
  174. package/utils/isChildOfFloatingToolbar.d.ts +1 -0
  175. package/utils/isChildOfFloatingToolbar.js +18 -0
  176. package/utils/isChildOfFloatingToolbar.js.map +1 -0
  177. package/utils/isHTMLElement.js.map +1 -1
  178. package/utils/isValidJSON.js +1 -2
  179. package/utils/isValidJSON.js.map +1 -1
  180. package/utils/isValidLexicalData.js +2 -4
  181. package/utils/isValidLexicalData.js.map +1 -1
  182. package/utils/point.js +2 -4
  183. package/utils/point.js.map +1 -1
  184. package/utils/rect.js +2 -4
  185. package/utils/rect.js.map +1 -1
  186. package/utils/sanitizeUrl.js +3 -4
  187. package/utils/sanitizeUrl.js.map +1 -1
  188. package/utils/setFloatingElemPosition.js.map +1 -1
  189. package/plugins/WebinyQuoteNodePlugin/WebinyQuoteNodePlugin.js +0 -26
  190. package/plugins/WebinyQuoteNodePlugin/WebinyQuoteNodePlugin.js.map +0 -1
  191. package/utils/isUrlLinkReference.d.ts +0 -1
  192. package/utils/isUrlLinkReference.js +0 -12
  193. package/utils/isUrlLinkReference.js.map +0 -1
  194. /package/plugins/{WebinyQuoteNodePlugin/WebinyQuoteNodePlugin.d.ts → QuoteNodePlugin/QuoteNodePlugin.d.ts} +0 -0
@@ -1,15 +1,16 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.LexicalHtmlRenderer = exports.BaseLexicalHtmlRenderer = void 0;
8
+ exports.LexicalHtmlRenderer = void 0;
9
9
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
10
10
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
12
  var _react = _interopRequireWildcard(require("react"));
12
- var _react2 = require("@emotion/react");
13
+ var _emotion = require("emotion");
13
14
  var _LexicalComposer = require("@lexical/react/LexicalComposer");
14
15
  var _LexicalRichTextPlugin = require("@lexical/react/LexicalRichTextPlugin");
15
16
  var _LexicalContentEditable = require("@lexical/react/LexicalContentEditable");
@@ -19,11 +20,14 @@ var _lexicalTheme = require("@webiny/lexical-theme");
19
20
  var _isValidLexicalData = require("../utils/isValidLexicalData");
20
21
  var _generateInitialLexicalValue = require("../utils/generateInitialLexicalValue");
21
22
  var _LexicalUpdateStatePlugin = require("../plugins/LexicalUpdateStatePlugin");
22
- var BaseLexicalHtmlRenderer = function BaseLexicalHtmlRenderer(_ref) {
23
+ var _RichTextEditorContext = require("../context/RichTextEditorContext");
24
+ var _excluded = ["nodes", "value", "theme"];
25
+ var LexicalHtmlRenderer = exports.LexicalHtmlRenderer = function LexicalHtmlRenderer(_ref) {
23
26
  var nodes = _ref.nodes,
24
27
  value = _ref.value,
25
28
  theme = _ref.theme,
26
- themeEmotionMap = _ref.themeEmotionMap;
29
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
30
+ var themeEmotionMap = props?.themeEmotionMap ?? (0, _lexicalTheme.toTypographyEmotionMap)(_emotion.css, theme, props.themeStylesTransformer);
27
31
  var editorTheme = (0, _react.useRef)((0, _lexicalTheme.createTheme)());
28
32
  var editorValue = (0, _isValidLexicalData.isValidLexicalData)(value) ? value : (0, _generateInitialLexicalValue.generateInitialLexicalValue)();
29
33
  var initialConfig = {
@@ -44,6 +48,9 @@ var BaseLexicalHtmlRenderer = function BaseLexicalHtmlRenderer(_ref) {
44
48
  return /*#__PURE__*/_react.default.createElement(_LexicalComposer.LexicalComposer, {
45
49
  initialConfig: initialConfig,
46
50
  key: initialConfig.nodes.length
51
+ }, /*#__PURE__*/_react.default.createElement(_RichTextEditorContext.RichTextEditorProvider, {
52
+ theme: theme,
53
+ themeEmotionMap: themeEmotionMap
47
54
  }, /*#__PURE__*/_react.default.createElement(_LexicalRichTextPlugin.RichTextPlugin, {
48
55
  contentEditable: /*#__PURE__*/_react.default.createElement("div", {
49
56
  className: "editor"
@@ -52,22 +59,7 @@ var BaseLexicalHtmlRenderer = function BaseLexicalHtmlRenderer(_ref) {
52
59
  placeholder: null
53
60
  }), /*#__PURE__*/_react.default.createElement(_LexicalUpdateStatePlugin.UpdateStatePlugin, {
54
61
  value: editorValue
55
- }));
56
- };
57
-
58
- /**
59
- * @description Main editor container
60
- */
61
- exports.BaseLexicalHtmlRenderer = BaseLexicalHtmlRenderer;
62
- var LexicalHtmlRenderer = function LexicalHtmlRenderer(props) {
63
- return /*#__PURE__*/_react.default.createElement(_react2.ClassNames, null, function (_ref2) {
64
- var css = _ref2.css;
65
- var themeEmotionMap = props?.themeEmotionMap ?? (0, _lexicalTheme.toTypographyEmotionMap)(css, props.theme, props.themeStylesTransformer);
66
- return /*#__PURE__*/_react.default.createElement(BaseLexicalHtmlRenderer, Object.assign({}, props, {
67
- themeEmotionMap: themeEmotionMap
68
- }));
69
- });
62
+ })));
70
63
  };
71
- exports.LexicalHtmlRenderer = LexicalHtmlRenderer;
72
64
 
73
65
  //# sourceMappingURL=LexicalHtmlRenderer.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_react2","_LexicalComposer","_LexicalRichTextPlugin","_LexicalContentEditable","_LexicalErrorBoundary","_interopRequireDefault","_lexicalNodes","_lexicalTheme","_isValidLexicalData","_generateInitialLexicalValue","_LexicalUpdateStatePlugin","BaseLexicalHtmlRenderer","_ref","nodes","value","theme","themeEmotionMap","editorTheme","useRef","createTheme","editorValue","isValidLexicalData","generateInitialLexicalValue","initialConfig","editorState","namespace","onError","editable","concat","_toConsumableArray2","default","allNodes","_objectSpread2","current","emotionMap","styles","createElement","LexicalComposer","key","length","RichTextPlugin","contentEditable","className","ContentEditable","ErrorBoundary","LexicalErrorBoundary","placeholder","UpdateStatePlugin","exports","LexicalHtmlRenderer","props","ClassNames","_ref2","css","toTypographyEmotionMap","themeStylesTransformer","Object","assign"],"sources":["LexicalHtmlRenderer.tsx"],"sourcesContent":["import React, { useRef } from \"react\";\nimport { Klass, LexicalNode } from \"lexical\";\nimport { ClassNames, CSSObject } from \"@emotion/react\";\nimport { LexicalComposer } from \"@lexical/react/LexicalComposer\";\nimport { RichTextPlugin } from \"@lexical/react/LexicalRichTextPlugin\";\nimport { ContentEditable } from \"@lexical/react/LexicalContentEditable\";\nimport LexicalErrorBoundary from \"@lexical/react/LexicalErrorBoundary\";\nimport { allNodes } from \"@webiny/lexical-nodes\";\nimport {\n createTheme,\n WebinyTheme,\n ThemeEmotionMap,\n toTypographyEmotionMap\n} from \"@webiny/lexical-theme\";\nimport { isValidLexicalData } from \"~/utils/isValidLexicalData\";\nimport { generateInitialLexicalValue } from \"~/utils/generateInitialLexicalValue\";\nimport { LexicalValue } from \"~/types\";\nimport { UpdateStatePlugin } from \"~/plugins/LexicalUpdateStatePlugin\";\n\ninterface LexicalHtmlRendererProps {\n nodes?: Klass<LexicalNode>[];\n value: LexicalValue | null;\n theme: WebinyTheme;\n themeEmotionMap?: ThemeEmotionMap;\n themeStylesTransformer?: (cssObject: Record<string, any>) => CSSObject;\n}\n\nexport const BaseLexicalHtmlRenderer = ({\n nodes,\n value,\n theme,\n themeEmotionMap\n}: LexicalHtmlRendererProps) => {\n const editorTheme = useRef(createTheme());\n const editorValue = isValidLexicalData(value) ? value : generateInitialLexicalValue();\n\n const initialConfig = {\n // We update the state via the `<LexicalUpdateStatePlugin/>`.\n editorState: null,\n namespace: \"webiny\",\n onError: () => {\n // Ignore errors. We don't want to break the app because of errors caused by config/value updates.\n // These are usually resolved in the next component render cycle.\n },\n editable: false,\n nodes: [...allNodes, ...(nodes || [])],\n theme: { ...editorTheme.current, emotionMap: themeEmotionMap, styles: theme.styles }\n };\n\n return (\n <LexicalComposer initialConfig={initialConfig} key={initialConfig.nodes.length}>\n <RichTextPlugin\n contentEditable={\n <div className=\"editor\">\n <ContentEditable />\n </div>\n }\n ErrorBoundary={LexicalErrorBoundary}\n placeholder={null}\n />\n <UpdateStatePlugin value={editorValue} />\n </LexicalComposer>\n );\n};\n\n/**\n * @description Main editor container\n */\nexport const LexicalHtmlRenderer = (props: LexicalHtmlRendererProps) => {\n return (\n <ClassNames>\n {({ css }) => {\n const themeEmotionMap =\n props?.themeEmotionMap ??\n toTypographyEmotionMap(css, props.theme, props.themeStylesTransformer);\n return <BaseLexicalHtmlRenderer {...props} themeEmotionMap={themeEmotionMap} />;\n }}\n </ClassNames>\n );\n};\n"],"mappings":"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"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_emotion","_LexicalComposer","_LexicalRichTextPlugin","_LexicalContentEditable","_LexicalErrorBoundary","_interopRequireDefault","_lexicalNodes","_lexicalTheme","_isValidLexicalData","_generateInitialLexicalValue","_LexicalUpdateStatePlugin","_RichTextEditorContext","_excluded","LexicalHtmlRenderer","exports","_ref","nodes","value","theme","props","_objectWithoutProperties2","default","themeEmotionMap","toTypographyEmotionMap","css","themeStylesTransformer","editorTheme","useRef","createTheme","editorValue","isValidLexicalData","generateInitialLexicalValue","initialConfig","editorState","namespace","onError","editable","concat","_toConsumableArray2","allNodes","_objectSpread2","current","emotionMap","styles","createElement","LexicalComposer","key","length","RichTextEditorProvider","RichTextPlugin","contentEditable","className","ContentEditable","ErrorBoundary","LexicalErrorBoundary","placeholder","UpdateStatePlugin"],"sources":["LexicalHtmlRenderer.tsx"],"sourcesContent":["import React, { useRef } from \"react\";\nimport { Klass, LexicalNode } from \"lexical\";\nimport { css } from \"emotion\";\nimport { CSSObject } from \"@emotion/react\";\nimport { LexicalComposer } from \"@lexical/react/LexicalComposer\";\nimport { RichTextPlugin } from \"@lexical/react/LexicalRichTextPlugin\";\nimport { ContentEditable } from \"@lexical/react/LexicalContentEditable\";\nimport LexicalErrorBoundary from \"@lexical/react/LexicalErrorBoundary\";\nimport { allNodes } from \"@webiny/lexical-nodes\";\nimport {\n createTheme,\n WebinyTheme,\n ThemeEmotionMap,\n toTypographyEmotionMap\n} from \"@webiny/lexical-theme\";\nimport { isValidLexicalData } from \"~/utils/isValidLexicalData\";\nimport { generateInitialLexicalValue } from \"~/utils/generateInitialLexicalValue\";\nimport { LexicalValue } from \"~/types\";\nimport { UpdateStatePlugin } from \"~/plugins/LexicalUpdateStatePlugin\";\nimport { RichTextEditorProvider } from \"~/context/RichTextEditorContext\";\n\ninterface LexicalHtmlRendererProps {\n nodes?: Klass<LexicalNode>[];\n value: LexicalValue | null;\n theme: WebinyTheme;\n themeEmotionMap?: ThemeEmotionMap;\n themeStylesTransformer?: (cssObject: Record<string, any>) => CSSObject;\n}\n\nexport const LexicalHtmlRenderer = ({\n nodes,\n value,\n theme,\n ...props\n}: LexicalHtmlRendererProps) => {\n const themeEmotionMap =\n props?.themeEmotionMap ?? toTypographyEmotionMap(css, theme, props.themeStylesTransformer);\n const editorTheme = useRef(createTheme());\n const editorValue = isValidLexicalData(value) ? value : generateInitialLexicalValue();\n\n const initialConfig = {\n // We update the state via the `<LexicalUpdateStatePlugin/>`.\n editorState: null,\n namespace: \"webiny\",\n onError: () => {\n // Ignore errors. We don't want to break the app because of errors caused by config/value updates.\n // These are usually resolved in the next component render cycle.\n },\n editable: false,\n nodes: [...allNodes, ...(nodes || [])],\n theme: { ...editorTheme.current, emotionMap: themeEmotionMap, styles: theme.styles }\n };\n\n return (\n <LexicalComposer initialConfig={initialConfig} key={initialConfig.nodes.length}>\n <RichTextEditorProvider theme={theme} themeEmotionMap={themeEmotionMap}>\n <RichTextPlugin\n contentEditable={\n <div className=\"editor\">\n <ContentEditable />\n </div>\n }\n ErrorBoundary={LexicalErrorBoundary}\n placeholder={null}\n />\n <UpdateStatePlugin value={editorValue} />\n </RichTextEditorProvider>\n </LexicalComposer>\n );\n};\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAH,OAAA;AACA,IAAAI,uBAAA,GAAAJ,OAAA;AACA,IAAAK,qBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,aAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AAMA,IAAAS,mBAAA,GAAAT,OAAA;AACA,IAAAU,4BAAA,GAAAV,OAAA;AAEA,IAAAW,yBAAA,GAAAX,OAAA;AACA,IAAAY,sBAAA,GAAAZ,OAAA;AAAyE,IAAAa,SAAA;AAUlE,IAAMC,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG,SAAtBA,mBAAmBA,CAAAE,IAAA,EAKA;EAAA,IAJ5BC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,KAAK,GAAAH,IAAA,CAALG,KAAK;IACFC,KAAK,OAAAC,yBAAA,CAAAC,OAAA,EAAAN,IAAA,EAAAH,SAAA;EAER,IAAMU,eAAe,GACjBH,KAAK,EAAEG,eAAe,IAAI,IAAAC,oCAAsB,EAACC,YAAG,EAAEN,KAAK,EAAEC,KAAK,CAACM,sBAAsB,CAAC;EAC9F,IAAMC,WAAW,GAAG,IAAAC,aAAM,EAAC,IAAAC,yBAAW,EAAC,CAAC,CAAC;EACzC,IAAMC,WAAW,GAAG,IAAAC,sCAAkB,EAACb,KAAK,CAAC,GAAGA,KAAK,GAAG,IAAAc,wDAA2B,EAAC,CAAC;EAErF,IAAMC,aAAa,GAAG;IAClB;IACAC,WAAW,EAAE,IAAI;IACjBC,SAAS,EAAE,QAAQ;IACnBC,OAAO,EAAE,SAAAA,QAAA,EAAM;MACX;MACA;IAAA,CACH;IACDC,QAAQ,EAAE,KAAK;IACfpB,KAAK,KAAAqB,MAAA,KAAAC,mBAAA,CAAAjB,OAAA,EAAMkB,sBAAQ,OAAAD,mBAAA,CAAAjB,OAAA,EAAML,KAAK,IAAI,EAAE,EAAE;IACtCE,KAAK,MAAAsB,cAAA,CAAAnB,OAAA,MAAAmB,cAAA,CAAAnB,OAAA,MAAOK,WAAW,CAACe,OAAO;MAAEC,UAAU,EAAEpB,eAAe;MAAEqB,MAAM,EAAEzB,KAAK,CAACyB;IAAM;EACtF,CAAC;EAED,oBACI9C,MAAA,CAAAwB,OAAA,CAAAuB,aAAA,CAAC3C,gBAAA,CAAA4C,eAAe;IAACb,aAAa,EAAEA,aAAc;IAACc,GAAG,EAAEd,aAAa,CAAChB,KAAK,CAAC+B;EAAO,gBAC3ElD,MAAA,CAAAwB,OAAA,CAAAuB,aAAA,CAACjC,sBAAA,CAAAqC,sBAAsB;IAAC9B,KAAK,EAAEA,KAAM;IAACI,eAAe,EAAEA;EAAgB,gBACnEzB,MAAA,CAAAwB,OAAA,CAAAuB,aAAA,CAAC1C,sBAAA,CAAA+C,cAAc;IACXC,eAAe,eACXrD,MAAA,CAAAwB,OAAA,CAAAuB,aAAA;MAAKO,SAAS,EAAC;IAAQ,gBACnBtD,MAAA,CAAAwB,OAAA,CAAAuB,aAAA,CAACzC,uBAAA,CAAAiD,eAAe,MAAE,CACjB,CACR;IACDC,aAAa,EAAEC,6BAAqB;IACpCC,WAAW,EAAE;EAAK,CACrB,CAAC,eACF1D,MAAA,CAAAwB,OAAA,CAAAuB,aAAA,CAAClC,yBAAA,CAAA8C,iBAAiB;IAACvC,KAAK,EAAEY;EAAY,CAAE,CACpB,CACX,CAAC;AAE1B,CAAC","ignoreList":[]}
@@ -4,9 +4,9 @@
4
4
  padding: 4px;
5
5
  vertical-align: middle;
6
6
  border: 1px solid #eee;
7
- height: 35px;
8
7
  will-change: transform;
9
8
  background: #fff;
9
+ flex-wrap: wrap;
10
10
  z-index: 1;
11
11
  }
12
12
 
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import "./StaticToolbar.css";
3
- export declare const StaticToolbar: () => JSX.Element;
3
+ export declare const StaticToolbar: () => React.JSX.Element;
@@ -1,22 +1,19 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.StaticToolbar = void 0;
9
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
8
  var _react = _interopRequireWildcard(require("react"));
11
- var _LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
12
9
  require("./StaticToolbar.css");
13
10
  var _LexicalEditorConfig = require("../LexicalEditorConfig/LexicalEditorConfig");
14
- var StaticToolbar = function StaticToolbar() {
15
- var _useLexicalComposerCo = (0, _LexicalComposerContext.useLexicalComposerContext)(),
16
- _useLexicalComposerCo2 = (0, _slicedToArray2.default)(_useLexicalComposerCo, 1),
17
- editor = _useLexicalComposerCo2[0];
11
+ var _hooks = require("../../hooks");
12
+ var StaticToolbar = exports.StaticToolbar = function StaticToolbar() {
18
13
  var _useLexicalEditorConf = (0, _LexicalEditorConfig.useLexicalEditorConfig)(),
19
14
  toolbarElements = _useLexicalEditorConf.toolbarElements;
15
+ var _useRichTextEditor = (0, _hooks.useRichTextEditor)(),
16
+ editor = _useRichTextEditor.editor;
20
17
  return /*#__PURE__*/_react.default.createElement("div", {
21
18
  className: "static-toolbar"
22
19
  }, editor.isEditable() && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, toolbarElements.map(function (action) {
@@ -25,6 +22,5 @@ var StaticToolbar = function StaticToolbar() {
25
22
  }, action.element);
26
23
  })));
27
24
  };
28
- exports.StaticToolbar = StaticToolbar;
29
25
 
30
26
  //# sourceMappingURL=StaticToolbar.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_LexicalComposerContext","_LexicalEditorConfig","StaticToolbar","_useLexicalComposerCo","useLexicalComposerContext","_useLexicalComposerCo2","_slicedToArray2","default","editor","_useLexicalEditorConf","useLexicalEditorConfig","toolbarElements","createElement","className","isEditable","Fragment","map","action","key","name","element","exports"],"sources":["StaticToolbar.tsx"],"sourcesContent":["import React, { Fragment } from \"react\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport \"./StaticToolbar.css\";\nimport { useLexicalEditorConfig } from \"~/components/LexicalEditorConfig/LexicalEditorConfig\";\n\nexport const StaticToolbar = () => {\n const [editor] = useLexicalComposerContext();\n const { toolbarElements } = useLexicalEditorConfig();\n\n return (\n <div className=\"static-toolbar\">\n {editor.isEditable() && (\n <>\n {toolbarElements.map(action => (\n <Fragment key={action.name}>{action.element}</Fragment>\n ))}\n </>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AACAA,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AAEO,IAAMG,aAAa,GAAG,SAAhBA,aAAaA,CAAA,EAAS;EAC/B,IAAAC,qBAAA,GAAiB,IAAAC,iDAAyB,EAAC,CAAC;IAAAC,sBAAA,OAAAC,eAAA,CAAAC,OAAA,EAAAJ,qBAAA;IAArCK,MAAM,GAAAH,sBAAA;EACb,IAAAI,qBAAA,GAA4B,IAAAC,2CAAsB,EAAC,CAAC;IAA5CC,eAAe,GAAAF,qBAAA,CAAfE,eAAe;EAEvB,oBACId,MAAA,CAAAU,OAAA,CAAAK,aAAA;IAAKC,SAAS,EAAC;EAAgB,GAC1BL,MAAM,CAACM,UAAU,CAAC,CAAC,iBAChBjB,MAAA,CAAAU,OAAA,CAAAK,aAAA,CAAAf,MAAA,CAAAU,OAAA,CAAAQ,QAAA,QACKJ,eAAe,CAACK,GAAG,CAAC,UAAAC,MAAM;IAAA,oBACvBpB,MAAA,CAAAU,OAAA,CAAAK,aAAA,CAACf,MAAA,CAAAkB,QAAQ;MAACG,GAAG,EAAED,MAAM,CAACE;IAAK,GAAEF,MAAM,CAACG,OAAkB,CAAC;EAAA,CAC1D,CACH,CAEL,CAAC;AAEd,CAAC;AAACC,OAAA,CAAAnB,aAAA,GAAAA,aAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_LexicalEditorConfig","_hooks","StaticToolbar","exports","_useLexicalEditorConf","useLexicalEditorConfig","toolbarElements","_useRichTextEditor","useRichTextEditor","editor","default","createElement","className","isEditable","Fragment","map","action","key","name","element"],"sources":["StaticToolbar.tsx"],"sourcesContent":["import React, { Fragment } from \"react\";\nimport \"./StaticToolbar.css\";\nimport { useLexicalEditorConfig } from \"~/components/LexicalEditorConfig/LexicalEditorConfig\";\nimport { useRichTextEditor } from \"~/hooks\";\n\nexport const StaticToolbar = () => {\n const { toolbarElements } = useLexicalEditorConfig();\n const { editor } = useRichTextEditor();\n\n return (\n <div className=\"static-toolbar\">\n {editor.isEditable() && (\n <>\n {toolbarElements.map(action => (\n <Fragment key={action.name}>{action.element}</Fragment>\n ))}\n </>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACAA,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEO,IAAMG,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,SAAhBA,aAAaA,CAAA,EAAS;EAC/B,IAAAE,qBAAA,GAA4B,IAAAC,2CAAsB,EAAC,CAAC;IAA5CC,eAAe,GAAAF,qBAAA,CAAfE,eAAe;EACvB,IAAAC,kBAAA,GAAmB,IAAAC,wBAAiB,EAAC,CAAC;IAA9BC,MAAM,GAAAF,kBAAA,CAANE,MAAM;EAEd,oBACIZ,MAAA,CAAAa,OAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAAgB,GAC1BH,MAAM,CAACI,UAAU,CAAC,CAAC,iBAChBhB,MAAA,CAAAa,OAAA,CAAAC,aAAA,CAAAd,MAAA,CAAAa,OAAA,CAAAI,QAAA,QACKR,eAAe,CAACS,GAAG,CAAC,UAAAC,MAAM;IAAA,oBACvBnB,MAAA,CAAAa,OAAA,CAAAC,aAAA,CAACd,MAAA,CAAAiB,QAAQ;MAACG,GAAG,EAAED,MAAM,CAACE;IAAK,GAAEF,MAAM,CAACG,OAAkB,CAAC;EAAA,CAC1D,CACH,CAEL,CAAC;AAEd,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- .floating-text-format-popup {
1
+ .floating-toolbar {
2
2
  display: flex;
3
3
  padding: 4px;
4
4
  vertical-align: middle;
@@ -15,7 +15,7 @@
15
15
  will-change: transform;
16
16
  }
17
17
 
18
- .floating-text-format-popup button.popup-item {
18
+ .floating-toolbar button.popup-item {
19
19
  border: 0;
20
20
  display: flex;
21
21
  background: none;
@@ -25,15 +25,15 @@
25
25
  vertical-align: middle;
26
26
  }
27
27
 
28
- .floating-text-format-popup button.popup-item:disabled {
28
+ .floating-toolbar button.popup-item:disabled {
29
29
  cursor: not-allowed;
30
30
  }
31
31
 
32
- .floating-text-format-popup button.popup-item.spaced {
32
+ .floating-toolbar button.popup-item.spaced {
33
33
  margin-right: 2px;
34
34
  }
35
35
 
36
- .floating-text-format-popup button.popup-item i.format {
36
+ .floating-toolbar button.popup-item i.format {
37
37
  background-size: contain;
38
38
  display: inline-block;
39
39
  height: 18px;
@@ -44,23 +44,23 @@
44
44
  opacity: 0.6;
45
45
  }
46
46
 
47
- .floating-text-format-popup button.popup-item:disabled i.format {
47
+ .floating-toolbar button.popup-item:disabled i.format {
48
48
  opacity: 0.2;
49
49
  }
50
50
 
51
- .floating-text-format-popup button.popup-item.active {
51
+ .floating-toolbar button.popup-item.active {
52
52
  background-color: rgba(223, 232, 250, 0.3);
53
53
  }
54
54
 
55
- .floating-text-format-popup button.popup-item.active i {
55
+ .floating-toolbar button.popup-item.active i {
56
56
  opacity: 1;
57
57
  }
58
58
 
59
- .floating-text-format-popup .popup-item:hover:not([disabled]) {
59
+ .floating-toolbar .popup-item:hover:not([disabled]) {
60
60
  background-color: #eee;
61
61
  }
62
62
 
63
- .floating-text-format-popup select.popup-item {
63
+ .floating-toolbar select.popup-item {
64
64
  border: 0;
65
65
  display: flex;
66
66
  background: none;
@@ -75,12 +75,12 @@
75
75
  text-overflow: ellipsis;
76
76
  }
77
77
 
78
- .floating-text-format-popup select.code-language {
78
+ .floating-toolbar select.code-language {
79
79
  text-transform: capitalize;
80
80
  width: 130px;
81
81
  }
82
82
 
83
- .floating-text-format-popup .popup-item .text {
83
+ .floating-toolbar .popup-item .text {
84
84
  display: flex;
85
85
  line-height: 20px;
86
86
  width: 200px;
@@ -94,7 +94,7 @@
94
94
  text-align: left;
95
95
  }
96
96
 
97
- .floating-text-format-popup .popup-item .icon {
97
+ .floating-toolbar .popup-item .icon {
98
98
  display: flex;
99
99
  width: 20px;
100
100
  height: 20px;
@@ -104,7 +104,7 @@
104
104
  background-size: contain;
105
105
  }
106
106
 
107
- .floating-text-format-popup i.chevron-down {
107
+ .floating-toolbar i.chevron-down {
108
108
  margin-top: 3px;
109
109
  width: 16px;
110
110
  height: 16px;
@@ -112,7 +112,7 @@
112
112
  user-select: none;
113
113
  }
114
114
 
115
- .floating-text-format-popup i.chevron-down.inside {
115
+ .floating-toolbar i.chevron-down.inside {
116
116
  width: 16px;
117
117
  height: 16px;
118
118
  display: flex;
@@ -122,7 +122,7 @@
122
122
  pointer-events: none;
123
123
  }
124
124
 
125
- .floating-text-format-popup .divider {
125
+ .floating-toolbar .divider {
126
126
  width: 1px;
127
127
  background-color: #eee;
128
128
  margin: 0 4px;
@@ -190,8 +190,8 @@ i.chevron-down {
190
190
  background-image: url("../../images/icons/chevron-down.svg");
191
191
  }
192
192
 
193
-
194
- i.insert-image, .icon.insert-image {
193
+ i.insert-image,
194
+ .icon.insert-image {
195
195
  background-color: transparent;
196
196
  background-size: contain;
197
197
  display: inline-block;
@@ -210,7 +210,8 @@ i.insert-image, .icon.insert-image {
210
210
  background-image: url("../../images/icons/list-ol.svg");
211
211
  }
212
212
 
213
- i.font-color, .icon.font-color {
213
+ i.font-color,
214
+ .icon.font-color {
214
215
  background-image: url("../../images/icons/font-color.svg");
215
216
  }
216
217
 
@@ -219,7 +220,7 @@ i.font-color, .icon.font-color {
219
220
  background-color: rgb(223, 232, 250);
220
221
  }
221
222
 
222
- .floating-text-format-popup button.toolbar-item {
223
+ .floating-toolbar button.toolbar-item {
223
224
  border: 0;
224
225
  display: flex;
225
226
  background: none;
@@ -232,15 +233,15 @@ i.font-color, .icon.font-color {
232
233
  justify-content: space-between;
233
234
  }
234
235
 
235
- .floating-text-format-popup button.toolbar-item:disabled {
236
+ .floating-toolbar button.toolbar-item:disabled {
236
237
  cursor: not-allowed;
237
238
  }
238
239
 
239
- .floating-text-format-popup button.toolbar-item.spaced {
240
+ .floating-toolbar button.toolbar-item.spaced {
240
241
  margin-right: 2px;
241
242
  }
242
243
 
243
- .floating-text-format-popup button.toolbar-item i.format {
244
+ .floating-toolbar button.toolbar-item i.format {
244
245
  background-size: contain;
245
246
  display: inline-block;
246
247
  height: 18px;
@@ -250,35 +251,35 @@ i.font-color, .icon.font-color {
250
251
  opacity: 0.6;
251
252
  }
252
253
 
253
- .floating-text-format-popup button.toolbar-item:disabled .icon,
254
- .floating-text-format-popup button.toolbar-item:disabled .text,
255
- .floating-text-format-popup button.toolbar-item:disabled i.format,
256
- .floating-text-format-popup button.toolbar-item:disabled .chevron-down {
254
+ .floating-toolbar button.toolbar-item:disabled .icon,
255
+ .floating-toolbar button.toolbar-item:disabled .text,
256
+ .floating-toolbar button.toolbar-item:disabled i.format,
257
+ .floating-toolbar button.toolbar-item:disabled .chevron-down {
257
258
  opacity: 0.2;
258
259
  }
259
260
 
260
- .floating-text-format-popup button.toolbar-item.active {
261
+ .floating-toolbar button.toolbar-item.active {
261
262
  background-color: rgba(223, 232, 250, 0.3);
262
263
  }
263
264
 
264
- .floating-text-format-popup button.toolbar-item.active i {
265
+ .floating-toolbar button.toolbar-item.active i {
265
266
  opacity: 1;
266
267
  }
267
268
 
268
- .floating-text-format-popup .toolbar-item:hover:not([disabled]) {
269
+ .floating-toolbar .toolbar-item:hover:not([disabled]) {
269
270
  background-color: #eee;
270
271
  }
271
272
 
272
- .floating-text-format-popup .toolbar-item.font-family .text {
273
+ .floating-toolbar .toolbar-item.font-family .text {
273
274
  display: block;
274
275
  max-width: 40px;
275
276
  }
276
277
 
277
- .floating-text-format-popup .code-language {
278
+ .floating-toolbar .code-language {
278
279
  width: 150px;
279
280
  }
280
281
 
281
- .floating-text-format-popup .toolbar-item .text {
282
+ .floating-toolbar .toolbar-item .text {
282
283
  display: flex;
283
284
  line-height: 20px;
284
285
  vertical-align: middle;
@@ -291,7 +292,7 @@ i.font-color, .icon.font-color {
291
292
  padding-right: 10px;
292
293
  }
293
294
 
294
- .floating-text-format-popup .toolbar-item .icon {
295
+ .floating-toolbar .toolbar-item .icon {
295
296
  display: flex;
296
297
  width: 20px;
297
298
  height: 20px;
@@ -301,7 +302,7 @@ i.font-color, .icon.font-color {
301
302
  background-size: contain;
302
303
  }
303
304
 
304
- .floating-text-format-popup i.chevron-down {
305
+ .floating-toolbar i.chevron-down {
305
306
  margin-top: 3px;
306
307
  width: 16px;
307
308
  height: 16px;
@@ -309,7 +310,7 @@ i.font-color, .icon.font-color {
309
310
  user-select: none;
310
311
  }
311
312
 
312
- .floating-text-format-popup i.chevron-down.inside {
313
+ .floating-toolbar i.chevron-down.inside {
313
314
  width: 16px;
314
315
  height: 16px;
315
316
  display: flex;
@@ -325,7 +326,7 @@ i.font-color, .icon.font-color {
325
326
  margin: 0 4px;
326
327
  }
327
328
 
328
- .toolbar-item.font-size{
329
+ .toolbar-item.font-size {
329
330
  width: 70px;
330
331
  }
331
332
 
@@ -340,7 +341,7 @@ i.font-color, .icon.font-color {
340
341
  display: block;
341
342
  position: fixed;
342
343
  box-shadow: 0 12px 28px 0 rgba(0, 0, 0, 0.2), 0 2px 4px 0 rgba(0, 0, 0, 0.1),
343
- inset 0 0 0 1px rgba(255, 255, 255, 0.5);
344
+ inset 0 0 0 1px rgba(255, 255, 255, 0.5);
344
345
  border-radius: 8px;
345
346
  min-height: 40px;
346
347
  background-color: #fff;
@@ -436,7 +437,7 @@ i.font-color, .icon.font-color {
436
437
  }
437
438
  }
438
439
 
439
- button.item i {
440
+ button.item i {
440
441
  opacity: 0.6;
441
442
  }
442
443
 
@@ -452,30 +453,30 @@ button.item.dropdown-item-active i {
452
453
  cursor: default;
453
454
  display: inline-block;
454
455
  position: relative;
455
- user-select: none
456
+ user-select: none;
456
457
  }
457
458
 
458
459
  .editor-shell .editor-image img {
459
460
  max-width: 100%;
460
- cursor: default
461
+ cursor: default;
461
462
  }
462
463
 
463
464
  .editor-shell .editor-image img.focused {
464
- outline: 2px solid rgb(60,132,244);
465
- user-select: none
465
+ outline: 2px solid rgb(60, 132, 244);
466
+ user-select: none;
466
467
  }
467
468
 
468
469
  .editor-shell .editor-image img.focused.draggable {
469
- cursor: grab
470
+ cursor: grab;
470
471
  }
471
472
 
472
473
  .editor-shell .editor-image img.focused.draggable:active {
473
- cursor: grabbing
474
+ cursor: grabbing;
474
475
  }
475
476
 
476
477
  .editor-shell .editor-image .image-caption-container .tree-view-output {
477
478
  margin: 0;
478
- border-radius: 0
479
+ border-radius: 0;
479
480
  }
480
481
 
481
482
  .editor-shell .editor-image .image-caption-container {
@@ -490,7 +491,7 @@ button.item.dropdown-item-active i {
490
491
  background-color: #ffffffe6;
491
492
  min-width: 100px;
492
493
  color: #000;
493
- overflow: hidden
494
+ overflow: hidden;
494
495
  }
495
496
 
496
497
  .editor-shell .editor-image .image-caption-button {
@@ -502,17 +503,17 @@ button.item.dropdown-item-active i {
502
503
  width: 30%;
503
504
  padding: 10px;
504
505
  margin: 0 auto;
505
- border: 1px solid rgba(255,255,255,.3);
506
+ border: 1px solid rgba(255, 255, 255, 0.3);
506
507
  border-radius: 5px;
507
508
  background-color: #00000080;
508
509
  min-width: 100px;
509
510
  color: #fff;
510
511
  cursor: pointer;
511
- user-select: none
512
+ user-select: none;
512
513
  }
513
514
 
514
515
  .editor-shell .editor-image .image-caption-button:hover {
515
- background-color: #3c84f480
516
+ background-color: #3c84f480;
516
517
  }
517
518
 
518
519
  .editor-shell .editor-image .image-resizer {
@@ -521,100 +522,100 @@ button.item.dropdown-item-active i {
521
522
  height: 7px;
522
523
  position: absolute;
523
524
  background-color: #3c84f4;
524
- border: 1px solid #fff
525
+ border: 1px solid #fff;
525
526
  }
526
527
 
527
528
  .editor-shell .editor-image .image-resizer.image-resizer-n {
528
529
  top: -6px;
529
530
  left: 48%;
530
- cursor: n-resize
531
+ cursor: n-resize;
531
532
  }
532
533
 
533
534
  .editor-shell .editor-image .image-resizer.image-resizer-ne {
534
535
  top: -6px;
535
536
  right: -6px;
536
- cursor: ne-resize
537
+ cursor: ne-resize;
537
538
  }
538
539
 
539
540
  .editor-shell .editor-image .image-resizer.image-resizer-e {
540
541
  bottom: 48%;
541
542
  right: -6px;
542
- cursor: e-resize
543
+ cursor: e-resize;
543
544
  }
544
545
 
545
546
  .editor-shell .editor-image .image-resizer.image-resizer-se {
546
547
  bottom: -2px;
547
548
  right: -6px;
548
- cursor: nwse-resize
549
+ cursor: nwse-resize;
549
550
  }
550
551
 
551
552
  .editor-shell .editor-image .image-resizer.image-resizer-s {
552
553
  bottom: -2px;
553
554
  left: 48%;
554
- cursor: s-resize
555
+ cursor: s-resize;
555
556
  }
556
557
 
557
558
  .editor-shell .editor-image .image-resizer.image-resizer-sw {
558
559
  bottom: -2px;
559
560
  left: -6px;
560
- cursor: sw-resize
561
+ cursor: sw-resize;
561
562
  }
562
563
 
563
564
  .editor-shell .editor-image .image-resizer.image-resizer-w {
564
565
  bottom: 48%;
565
566
  left: -6px;
566
- cursor: w-resize
567
+ cursor: w-resize;
567
568
  }
568
569
 
569
570
  .editor-shell .editor-image .image-resizer.image-resizer-nw {
570
571
  top: -6px;
571
572
  left: -6px;
572
- cursor: nw-resize
573
+ cursor: nw-resize;
573
574
  }
574
575
 
575
576
  .editor-shell span.inline-editor-image {
576
577
  cursor: default;
577
578
  display: inline-block;
578
579
  position: relative;
579
- z-index: 1
580
+ z-index: 1;
580
581
  }
581
582
 
582
583
  .editor-shell .inline-editor-image img {
583
584
  max-width: 100%;
584
- cursor: default
585
+ cursor: default;
585
586
  }
586
587
 
587
588
  .editor-shell .inline-editor-image img.focused {
588
- outline: 2px solid rgb(60,132,244)
589
+ outline: 2px solid rgb(60, 132, 244);
589
590
  }
590
591
 
591
592
  .editor-shell .inline-editor-image img.focused.draggable {
592
- cursor: grab
593
+ cursor: grab;
593
594
  }
594
595
 
595
596
  .editor-shell .inline-editor-image img.focused.draggable:active {
596
- cursor: grabbing
597
+ cursor: grabbing;
597
598
  }
598
599
 
599
600
  .editor-shell .inline-editor-image .image-caption-container .tree-view-output {
600
601
  margin: 0;
601
- border-radius: 0
602
+ border-radius: 0;
602
603
  }
603
604
 
604
605
  .editor-shell .inline-editor-image.position-full {
605
- margin: 1em 0
606
+ margin: 1em 0;
606
607
  }
607
608
 
608
609
  .editor-shell .inline-editor-image.position-left {
609
610
  float: left;
610
611
  width: 50%;
611
- margin: 1em 1em 0 0
612
+ margin: 1em 1em 0 0;
612
613
  }
613
614
 
614
615
  .editor-shell .inline-editor-image.position-right {
615
616
  float: right;
616
617
  width: 50%;
617
- margin: 1em 0 0 1em
618
+ margin: 1em 0 0 1em;
618
619
  }
619
620
 
620
621
  .editor-shell .inline-editor-image .image-edit-button {
@@ -624,17 +625,17 @@ button.item.dropdown-item-active i {
624
625
  right: 12px;
625
626
  padding: 6px 8px;
626
627
  margin: 0 auto;
627
- border: 1px solid rgba(255,255,255,.3);
628
+ border: 1px solid rgba(255, 255, 255, 0.3);
628
629
  border-radius: 5px;
629
630
  background-color: #00000080;
630
631
  min-width: 60px;
631
632
  color: #fff;
632
633
  cursor: pointer;
633
- user-select: none
634
+ user-select: none;
634
635
  }
635
636
 
636
637
  .editor-shell .inline-editor-image .image-edit-button:hover {
637
- background-color: #3c84f480
638
+ background-color: #3c84f480;
638
639
  }
639
640
 
640
641
  .editor-shell .inline-editor-image .image-caption-container {
@@ -642,5 +643,5 @@ button.item.dropdown-item-active i {
642
643
  background-color: #f4f4f4;
643
644
  min-width: 100%;
644
645
  color: #000;
645
- overflow: hidden
646
+ overflow: hidden;
646
647
  }