@modusoperandi/licit 0.13.25 → 0.14.0
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.
- package/.eslintrc.js +1 -1
- package/README.md +1 -0
- package/dist/BlockquoteInsertNewLineCommand.js +3 -23
- package/dist/BlockquoteNodeSpec.js +3 -13
- package/dist/BlockquoteToggleCommand.js +3 -16
- package/dist/BookmarkNodeSpec.js +0 -6
- package/dist/BulletListNodeSpec.js +2 -16
- package/dist/CZIProseMirror.js +3 -27
- package/dist/CodeBlockCommand.js +3 -19
- package/dist/CodeBlockNodeSpec.js +3 -4
- package/dist/CodeMarkSpec.js +0 -4
- package/dist/ContentPlaceholderPlugin.js +6 -58
- package/dist/CursorPlaceholderPlugin.js +2 -32
- package/dist/DocLayoutCommand.js +5 -28
- package/dist/DocNodeSpec.js +0 -9
- package/dist/EMMarkSpec.js +0 -4
- package/dist/EditorCommands.js +5 -33
- package/dist/EditorKeyMap.js +4 -18
- package/dist/EditorMarks.js +2 -26
- package/dist/EditorNodes.js +4 -22
- package/dist/EditorPageLayoutPlugin.js +3 -15
- package/dist/EditorPlugins.js +0 -4
- package/dist/EditorSchema.js +0 -5
- package/dist/EditorState.js +0 -2
- package/dist/FontSizeMarkSpec.js +0 -12
- package/dist/FontTypeMarkSpec.js +15 -19
- package/dist/HTMLMutator.js +5 -24
- package/dist/HardBreakNodeSpec.js +0 -2
- package/dist/HeadingNodeSpec.js +6 -15
- package/dist/HistoryRedoCommand.js +3 -11
- package/dist/HistoryUndoCommand.js +3 -11
- package/dist/HorizontalRuleCommand.js +3 -22
- package/dist/HorizontalRuleNodeSpec.js +0 -10
- package/dist/ImageFromURLCommand.js +0 -9
- package/dist/ImageNodeSpec.js +2 -14
- package/dist/ImageSourceCommand.js +3 -39
- package/dist/ImageUploadCommand.js +3 -21
- package/dist/ImageUploadPlaceholderPlugin.js +10 -48
- package/dist/LinkMarkSpec.js +0 -4
- package/dist/LinkSetURLCommand.js +3 -28
- package/dist/LinkTooltipPlugin.js +6 -52
- package/dist/ListItemInsertNewLineCommand.js +3 -23
- package/dist/ListItemMergeCommand.js +15 -66
- package/dist/ListItemNodeSpec.js +0 -11
- package/dist/ListSplitCommand.js +3 -14
- package/dist/ListToggleCommand.js +5 -26
- package/dist/MarksClearCommand.js +6 -17
- package/dist/MathEditCommand.js +3 -38
- package/dist/MathNodeSpec.js +0 -10
- package/dist/OrderedListNodeSpec.js +0 -24
- package/dist/ParagraphNodeSpec.js +5 -26
- package/dist/ParagraphSpacingCommand.js +3 -32
- package/dist/PrintCommand.js +3 -13
- package/dist/SelectionPlaceholderPlugin.js +2 -31
- package/dist/SpacerMarkSpec.js +2 -6
- package/dist/StrikeMarkSpec.js +0 -4
- package/dist/StrongMarkSpec.js +2 -5
- package/dist/StyleView.js +1 -7
- package/dist/TableBackgroundColorCommand.js +3 -24
- package/dist/TableBorderColorCommand.js +3 -24
- package/dist/TableCellColorCommand.js +3 -23
- package/dist/TableCellMenuPlugin.js +9 -45
- package/dist/TableInsertCommand.js +7 -39
- package/dist/TableMergeCellsCommand.js +5 -30
- package/dist/TableNodesSpecs.js +4 -23
- package/dist/TablePlugins.js +0 -5
- package/dist/TableResizePlugin.js +54 -138
- package/dist/TextColorMarkSpec.js +0 -9
- package/dist/TextHighlightMarkSpec.js +0 -8
- package/dist/TextInsertTabSpaceCommand.js +3 -28
- package/dist/TextNoWrapMarkSpec.js +0 -4
- package/dist/TextSelectionMarkSpec.js +0 -5
- package/dist/TextSubMarkSpec.js +0 -4
- package/dist/TextSuperMarkSpec.js +0 -4
- package/dist/TextUnderlineMarkSpec.js +0 -4
- package/dist/Types.js +0 -6
- package/dist/WebFontLoader.js +3 -8
- package/dist/blockQuoteInputRule.js +0 -13
- package/dist/bom.xml +1492 -1645
- package/dist/buildEditorPlugins.js +5 -27
- package/dist/buildInputRules.js +12 -24
- package/dist/client/CollabConnector.js +6 -30
- package/dist/client/EditorConnection.js +23 -69
- package/dist/client/Licit.js +79 -163
- package/dist/client/Licit.js.flow +16 -2
- package/dist/client/Licit.test.js +6 -13
- package/dist/client/Reporter.js +1 -8
- package/dist/client/SimpleConnector.js +6 -26
- package/dist/client/http.js +8 -15
- package/dist/client/throttle.js +0 -2
- package/dist/convertFromDOMElement.js +2 -10
- package/dist/convertFromHTML.js +0 -5
- package/dist/convertFromJSON.js +3 -13
- package/dist/convertToCSSPTValue.js +0 -6
- package/dist/convertToJSON.js +0 -2
- package/dist/createCommand.js +3 -11
- package/dist/createEditorKeyMap.js +0 -13
- package/dist/createEmptyEditorState.js +0 -7
- package/dist/createTableResizingPlugin.js +5 -16
- package/dist/findActionableCell.js +0 -19
- package/dist/findActiveMark.js +0 -11
- package/dist/hyphenize.js +2 -4
- package/dist/index.js +0 -9
- package/dist/insertTable.js +0 -16
- package/dist/isEditorStateEmpty.js +0 -6
- package/dist/isTableNode.js +0 -3
- package/dist/joinDown.js +0 -7
- package/dist/joinListNode.js +0 -15
- package/dist/joinUp.js +0 -9
- package/dist/keymaps.js +0 -15
- package/dist/lookUpElement.js +0 -3
- package/dist/nodeAt.js +0 -3
- package/dist/normalizeHTML.js +9 -25
- package/dist/patchAnchorElements.js +5 -12
- package/dist/patchBreakElements.js +0 -6
- package/dist/patchElementInlineStyles.js +5 -15
- package/dist/patchListElements.js +20 -54
- package/dist/patchMathElements.js +11 -21
- package/dist/patchParagraphElements.js +0 -5
- package/dist/patchStyleElements.js +12 -41
- package/dist/patchTableElements.js +9 -37
- package/dist/rebaseDocWithSteps.js +0 -6
- package/dist/sanitizeURL.js +0 -3
- package/dist/splitListItem.js +12 -43
- package/dist/toClosestFontPtSize.js +1 -5
- package/dist/toSafeHTMLDocument.js +0 -1
- package/dist/toggleBlockquote.js +2 -19
- package/dist/toggleCodeBlock.js +2 -22
- package/dist/ui/AlertInfo.js +6 -22
- package/dist/ui/BookmarkNodeView.js +7 -28
- package/dist/ui/CommandButton.js +3 -19
- package/dist/ui/CommandMenu.js +3 -25
- package/dist/ui/CommandMenuButton.js +3 -36
- package/dist/ui/CustomEditorView.js +3 -16
- package/dist/ui/CustomMenu.js +0 -8
- package/dist/ui/CustomMenuItem.js +4 -18
- package/dist/ui/CustomNodeView.js +21 -67
- package/dist/ui/CustomRadioButton.js +14 -33
- package/dist/ui/DocLayoutEditor.js +5 -27
- package/dist/ui/Editor.js +18 -79
- package/dist/ui/EditorFrameset.js +3 -18
- package/dist/ui/EditorToolbar.js +10 -46
- package/dist/ui/EditorToolbarConfig.js +10 -20
- package/dist/ui/FontSizeCommandMenuButton.js +5 -19
- package/dist/ui/FontTypeCommandMenuButton.js +5 -22
- package/dist/ui/Frag.js +0 -7
- package/dist/ui/Icon.js +5 -25
- package/dist/ui/ImageAlignEditor.js +3 -16
- package/dist/ui/ImageInlineEditor.js +3 -16
- package/dist/ui/ImageNodeView.js +20 -109
- package/dist/ui/ImageResizeBox.js +3 -53
- package/dist/ui/ImageURLEditor.js +3 -28
- package/dist/ui/ImageUploadEditor.js +3 -35
- package/dist/ui/LinkTooltip.js +5 -25
- package/dist/ui/LinkURLEditor.js +3 -29
- package/dist/ui/ListItemNodeView.js +15 -30
- package/dist/ui/ListTypeButton.js +5 -37
- package/dist/ui/ListTypeCommandButton.js +3 -19
- package/dist/ui/ListTypeMenu.js +4 -25
- package/dist/ui/LoadingIndicator.js +0 -7
- package/dist/ui/MathEditor.js +3 -24
- package/dist/ui/MathInlineEditor.js +3 -26
- package/dist/ui/MathNodeView.js +9 -59
- package/dist/ui/PasteMenu.js +4 -20
- package/dist/ui/ResizeObserver.js +0 -18
- package/dist/ui/RichTextEditor.js +5 -27
- package/dist/ui/SelectionObserver.js +3 -29
- package/dist/ui/TableCellMenu.js +3 -18
- package/dist/ui/TableGridSizeEditor.js +5 -51
- package/dist/ui/TableNodeView.js +0 -11
- package/dist/ui/bindScrollHandler.js +2 -9
- package/dist/ui/canUseCSSFont.js +2 -8
- package/dist/ui/czi-icon.css +4 -4
- package/dist/ui/findActiveFontSize.js +2 -18
- package/dist/ui/findActiveFontType.js +0 -12
- package/dist/ui/handleEditorDrop.js +0 -9
- package/dist/ui/handleEditorKeyDown.js +0 -7
- package/dist/ui/handleEditorPaste.js +0 -9
- package/dist/ui/htmlElementToRect.js +0 -4
- package/dist/ui/injectStyleSheet.js +0 -10
- package/dist/ui/isElementFullyVisible.js +2 -8
- package/dist/ui/isOffline.js +0 -2
- package/dist/ui/isReactClass.js +0 -4
- package/dist/ui/mathquill-editor/MathQuillEditor.js +9 -44
- package/dist/ui/mathquill-editor/MathQuillEditorSymbols.js +1 -3
- package/dist/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +3 -16
- package/dist/ui/mathquill-editor/mathquill-import-kludge.js +5 -7
- package/dist/ui/renderLaTeXAsHTML.js +2 -13
- package/dist/ui/resolveImage.js +7 -32
- package/dist/ui/toCSSColor.js +0 -14
- package/dist/ui/toCSSLineSpacing.js +10 -11
- package/dist/ui/toHexColor.js +0 -8
- package/dist/ui/uuid.js +0 -2
- package/dist/uuid.js +0 -2
- package/package-lock.json.old +32889 -0
- package/package.json +45 -69
- package/src/client/Licit.js +16 -2
- package/src/ui/czi-icon.css +4 -4
- package/utils/build_web_server.js +1 -7
- package/webpack.config.js +3 -3
package/dist/ui/Editor.js
CHANGED
|
@@ -4,71 +4,40 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.bpfrpt_proptype_EditorProps = exports.DEFAULT_NODE_VIEWS = void 0;
|
|
7
|
-
|
|
8
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
-
|
|
10
8
|
var _prosemirrorModel = require("prosemirror-model");
|
|
11
|
-
|
|
12
9
|
var _prosemirrorState = require("prosemirror-state");
|
|
13
|
-
|
|
14
10
|
var _prosemirrorTransform = require("prosemirror-transform");
|
|
15
|
-
|
|
16
11
|
var _prosemirrorView = require("prosemirror-view");
|
|
17
|
-
|
|
18
12
|
var React = _interopRequireWildcard(require("react"));
|
|
19
|
-
|
|
20
13
|
var _webfontloader = _interopRequireDefault(require("webfontloader"));
|
|
21
|
-
|
|
22
14
|
require("prosemirror-gapcursor/style/gapcursor.css");
|
|
23
|
-
|
|
24
15
|
require("prosemirror-view/style/prosemirror.css");
|
|
25
|
-
|
|
26
16
|
var _CZIProseMirror = require("../CZIProseMirror");
|
|
27
|
-
|
|
28
17
|
var _NodeNames = require("../NodeNames");
|
|
29
|
-
|
|
30
18
|
var _WebFontLoader = _interopRequireDefault(require("../WebFontLoader"));
|
|
31
|
-
|
|
32
19
|
var _FontTypeMarkSpec = require("../FontTypeMarkSpec");
|
|
33
|
-
|
|
34
20
|
var _createEmptyEditorState = _interopRequireDefault(require("../createEmptyEditorState"));
|
|
35
|
-
|
|
36
21
|
var _normalizeHTML = _interopRequireDefault(require("../normalizeHTML"));
|
|
37
|
-
|
|
38
22
|
var _BookmarkNodeView = _interopRequireDefault(require("./BookmarkNodeView"));
|
|
39
|
-
|
|
40
23
|
var _CustomEditorView = _interopRequireDefault(require("./CustomEditorView"));
|
|
41
|
-
|
|
42
24
|
var _CustomNodeView = _interopRequireDefault(require("./CustomNodeView"));
|
|
43
|
-
|
|
44
25
|
var _ImageNodeView = _interopRequireDefault(require("./ImageNodeView"));
|
|
45
|
-
|
|
46
26
|
var _ListItemNodeView = _interopRequireDefault(require("./ListItemNodeView"));
|
|
47
|
-
|
|
48
27
|
var _MathNodeView = _interopRequireDefault(require("./MathNodeView"));
|
|
49
|
-
|
|
50
28
|
var _handleEditorDrop = _interopRequireDefault(require("./handleEditorDrop"));
|
|
51
|
-
|
|
52
29
|
var _handleEditorKeyDown = _interopRequireDefault(require("./handleEditorKeyDown"));
|
|
53
|
-
|
|
54
30
|
var _handleEditorPaste = _interopRequireDefault(require("./handleEditorPaste"));
|
|
55
|
-
|
|
56
31
|
var _uuid = _interopRequireDefault(require("./uuid"));
|
|
57
|
-
|
|
58
32
|
require("./czi-editor.css");
|
|
59
|
-
|
|
60
33
|
var _Types = require("../Types");
|
|
61
|
-
|
|
62
34
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
63
|
-
|
|
64
35
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
65
|
-
|
|
66
36
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
67
|
-
|
|
68
37
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
69
|
-
|
|
70
|
-
function
|
|
71
|
-
|
|
38
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
39
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
40
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
72
41
|
var bpfrpt_proptype_EditorProps = {
|
|
73
42
|
"autoFocus": _propTypes.default.bool,
|
|
74
43
|
"disabled": _propTypes.default.bool,
|
|
@@ -97,8 +66,9 @@ window.CZIProseMirror = {
|
|
|
97
66
|
exportJSON: _CZIProseMirror.exportJSON,
|
|
98
67
|
registeryKeys: _CZIProseMirror.registeryKeys
|
|
99
68
|
};
|
|
100
|
-
const AUTO_FOCUS_DELAY = 350;
|
|
69
|
+
const AUTO_FOCUS_DELAY = 350;
|
|
101
70
|
|
|
71
|
+
// Default custom node views.
|
|
102
72
|
const DEFAULT_NODE_VIEWS = Object.freeze({
|
|
103
73
|
[_NodeNames.IMAGE]: _ImageNodeView.default,
|
|
104
74
|
[_NodeNames.MATH]: _MathNodeView.default,
|
|
@@ -106,15 +76,15 @@ const DEFAULT_NODE_VIEWS = Object.freeze({
|
|
|
106
76
|
[_NodeNames.LIST_ITEM]: _ListItemNodeView.default
|
|
107
77
|
});
|
|
108
78
|
exports.DEFAULT_NODE_VIEWS = DEFAULT_NODE_VIEWS;
|
|
109
|
-
const EDITOR_EMPTY_STATE = Object.freeze((0, _createEmptyEditorState.default)());
|
|
79
|
+
const EDITOR_EMPTY_STATE = Object.freeze((0, _createEmptyEditorState.default)());
|
|
80
|
+
|
|
81
|
+
// Monkey patch the `scrollIntoView` mathod of 'Transaction'.
|
|
110
82
|
// Why this is necessary?
|
|
111
83
|
// It appears that promse-mirror does call `scrollIntoView` extensively
|
|
112
84
|
// from many of the built-in transformations, thus cause unwanted page
|
|
113
85
|
// scrolls. To make the behavior more manageable, this patched method asks
|
|
114
86
|
// developer to explicitly use `scrollIntoView(true)` to enforce page scroll.
|
|
115
|
-
|
|
116
87
|
const scrollIntoView = _prosemirrorState.Transaction.prototype.scrollIntoView;
|
|
117
|
-
|
|
118
88
|
const scrollIntoViewPatched = function (forced) {
|
|
119
89
|
if (forced === true && scrollIntoView) {
|
|
120
90
|
return scrollIntoView.call(this);
|
|
@@ -122,81 +92,64 @@ const scrollIntoViewPatched = function (forced) {
|
|
|
122
92
|
return this;
|
|
123
93
|
}
|
|
124
94
|
};
|
|
95
|
+
_prosemirrorState.Transaction.prototype.scrollIntoView = scrollIntoViewPatched;
|
|
125
96
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
97
|
+
// Sets the implementation so that `FontTypeMarkSpec` can load custom fonts.
|
|
98
|
+
_WebFontLoader.default.setImplementation(_webfontloader.default);
|
|
99
|
+
// FS IRAD-988 2020-06-18
|
|
131
100
|
(0, _FontTypeMarkSpec.preLoadFonts)();
|
|
132
101
|
const handleDOMEvents = {
|
|
133
102
|
drop: _handleEditorDrop.default,
|
|
134
103
|
keydown: _handleEditorKeyDown.default,
|
|
135
104
|
paste: _handleEditorPaste.default
|
|
136
105
|
};
|
|
137
|
-
|
|
138
106
|
function bindNodeView(NodeView) {
|
|
139
107
|
return (node, view, getPos, decorations) => {
|
|
140
108
|
return new NodeView(node, view, getPos, decorations);
|
|
141
109
|
};
|
|
142
110
|
}
|
|
143
|
-
|
|
144
111
|
function getSchema(editorState) {
|
|
145
112
|
return editorState ? editorState.schema : EDITOR_EMPTY_STATE.schema;
|
|
146
113
|
}
|
|
147
|
-
|
|
148
114
|
class Editor extends React.PureComponent {
|
|
149
115
|
constructor() {
|
|
150
116
|
super(...arguments);
|
|
151
|
-
|
|
152
117
|
_defineProperty(this, "_autoFocusTimer", 0);
|
|
153
|
-
|
|
154
118
|
_defineProperty(this, "_id", (0, _uuid.default)());
|
|
155
|
-
|
|
156
119
|
_defineProperty(this, "_editorView", null);
|
|
157
|
-
|
|
158
120
|
_defineProperty(this, "props", void 0);
|
|
159
|
-
|
|
160
121
|
_defineProperty(this, "state", {
|
|
161
122
|
isPrinting: false
|
|
162
123
|
});
|
|
163
|
-
|
|
164
124
|
_defineProperty(this, "_onBlur", () => {
|
|
165
125
|
const {
|
|
166
126
|
onBlur
|
|
167
127
|
} = this.props;
|
|
168
128
|
const view = this._editorView;
|
|
169
|
-
|
|
170
129
|
if (view && !view.disabled && !view.readOnly && onBlur) {
|
|
171
130
|
onBlur();
|
|
172
131
|
}
|
|
173
132
|
});
|
|
174
|
-
|
|
175
133
|
_defineProperty(this, "focus", () => {
|
|
176
134
|
const view = this._editorView;
|
|
177
|
-
|
|
178
135
|
if (view && !view.disabled && !view.readOnly) {
|
|
179
136
|
view.focus();
|
|
180
137
|
}
|
|
181
138
|
});
|
|
182
|
-
|
|
183
139
|
_defineProperty(this, "_dispatchTransaction", transaction => {
|
|
184
140
|
const {
|
|
185
141
|
editorState,
|
|
186
142
|
readOnly,
|
|
187
143
|
onChange
|
|
188
144
|
} = this.props;
|
|
189
|
-
|
|
190
145
|
if (readOnly === true || !onChange) {
|
|
191
146
|
return;
|
|
192
147
|
}
|
|
193
|
-
|
|
194
148
|
onChange({
|
|
195
149
|
transaction,
|
|
196
150
|
state: editorState || EDITOR_EMPTY_STATE
|
|
197
151
|
});
|
|
198
152
|
});
|
|
199
|
-
|
|
200
153
|
_defineProperty(this, "_isEditable", () => {
|
|
201
154
|
const {
|
|
202
155
|
disabled,
|
|
@@ -207,20 +160,17 @@ class Editor extends React.PureComponent {
|
|
|
207
160
|
} = this.state;
|
|
208
161
|
return !isPrinting && !!this._editorView && !readOnly && !disabled;
|
|
209
162
|
});
|
|
210
|
-
|
|
211
163
|
_defineProperty(this, "_onPrintStart", () => {
|
|
212
164
|
this.setState({
|
|
213
165
|
isPrinting: true
|
|
214
166
|
});
|
|
215
167
|
});
|
|
216
|
-
|
|
217
168
|
_defineProperty(this, "_onPrintEnd", () => {
|
|
218
169
|
this.setState({
|
|
219
170
|
isPrinting: false
|
|
220
171
|
});
|
|
221
172
|
});
|
|
222
173
|
}
|
|
223
|
-
|
|
224
174
|
componentDidMount() {
|
|
225
175
|
const {
|
|
226
176
|
onReady,
|
|
@@ -234,7 +184,6 @@ class Editor extends React.PureComponent {
|
|
|
234
184
|
transformPastedHTML
|
|
235
185
|
} = this.props;
|
|
236
186
|
const editorNode = document.getElementById(this._id);
|
|
237
|
-
|
|
238
187
|
if (editorNode) {
|
|
239
188
|
const effectiveNodeViews = Object.assign({}, DEFAULT_NODE_VIEWS, nodeViews);
|
|
240
189
|
const boundNodeViews = {};
|
|
@@ -243,13 +192,14 @@ class Editor extends React.PureComponent {
|
|
|
243
192
|
nodes
|
|
244
193
|
} = schema;
|
|
245
194
|
Object.keys(effectiveNodeViews).forEach(nodeName => {
|
|
246
|
-
const nodeView = effectiveNodeViews[nodeName];
|
|
247
|
-
|
|
195
|
+
const nodeView = effectiveNodeViews[nodeName];
|
|
196
|
+
// Only valid and supported node views should be used.
|
|
248
197
|
if (nodes[nodeName]) {
|
|
249
198
|
boundNodeViews[nodeName] = bindNodeView(nodeView);
|
|
250
199
|
}
|
|
251
|
-
});
|
|
200
|
+
});
|
|
252
201
|
|
|
202
|
+
// Reference: http://prosemirror.net/examples/basic/
|
|
253
203
|
const view = this._editorView = new _CustomEditorView.default(editorNode, {
|
|
254
204
|
dispatchTransaction,
|
|
255
205
|
editable: this._isEditable,
|
|
@@ -262,35 +212,30 @@ class Editor extends React.PureComponent {
|
|
|
262
212
|
view.placeholder = placeholder;
|
|
263
213
|
view.readOnly = !!readOnly;
|
|
264
214
|
view.disabled = !!disabled;
|
|
265
|
-
view.updateState(editorState || EDITOR_EMPTY_STATE);
|
|
215
|
+
view.updateState(editorState || EDITOR_EMPTY_STATE);
|
|
266
216
|
|
|
217
|
+
// Expose the view to CZIProseMirror so developer could debug it.
|
|
267
218
|
(0, _CZIProseMirror.registerEditorView)(this._id, view);
|
|
268
219
|
this.onEditorReady(view, onReady);
|
|
269
220
|
}
|
|
270
|
-
|
|
271
221
|
window.addEventListener('beforeprint', this._onPrintStart, false);
|
|
272
222
|
window.addEventListener('afterprint', this._onPrintEnd, false);
|
|
273
223
|
}
|
|
274
|
-
|
|
275
224
|
onEditorReady(view, onReady) {
|
|
276
225
|
onReady && onReady(view);
|
|
277
226
|
this._autoFocusTimer && clearTimeout(this._autoFocusTimer);
|
|
278
227
|
this._autoFocusTimer = this.props.autoFocus ? setTimeout(this.focus, AUTO_FOCUS_DELAY) : 0;
|
|
279
228
|
}
|
|
280
|
-
|
|
281
229
|
componentDidUpdate(prevProps) {
|
|
282
230
|
const view = this._editorView;
|
|
283
|
-
|
|
284
231
|
if (view) {
|
|
285
232
|
const prevSchema = getSchema(prevProps.editorState);
|
|
286
233
|
const currSchema = getSchema(this.props.editorState);
|
|
287
|
-
|
|
288
234
|
if (prevSchema !== currSchema) {
|
|
289
235
|
// schema should never change.
|
|
290
236
|
// TODO: re-create the editor view if schema changed.
|
|
291
237
|
console.error('editor schema changed.');
|
|
292
238
|
}
|
|
293
|
-
|
|
294
239
|
const {
|
|
295
240
|
runtime,
|
|
296
241
|
editorState,
|
|
@@ -311,7 +256,6 @@ class Editor extends React.PureComponent {
|
|
|
311
256
|
this._autoFocusTimer = !prevProps.autoFocus && this.props.autoFocus ? setTimeout(this.focus, AUTO_FOCUS_DELAY) : 0;
|
|
312
257
|
}
|
|
313
258
|
}
|
|
314
|
-
|
|
315
259
|
componentWillUnmount() {
|
|
316
260
|
this._autoFocusTimer && clearTimeout(this._autoFocusTimer);
|
|
317
261
|
this._editorView && this._editorView.destroy();
|
|
@@ -320,7 +264,6 @@ class Editor extends React.PureComponent {
|
|
|
320
264
|
window.removeEventListener('beforeprint', this._onPrintStart, false);
|
|
321
265
|
window.removeEventListener('afterprint', this._onPrintEnd, false);
|
|
322
266
|
}
|
|
323
|
-
|
|
324
267
|
render() {
|
|
325
268
|
const {
|
|
326
269
|
embedded,
|
|
@@ -337,14 +280,10 @@ class Editor extends React.PureComponent {
|
|
|
337
280
|
onBlur: this._onBlur
|
|
338
281
|
});
|
|
339
282
|
}
|
|
340
|
-
|
|
341
283
|
}
|
|
342
|
-
|
|
343
284
|
_defineProperty(Editor, "EDITOR_EMPTY_STATE", EDITOR_EMPTY_STATE);
|
|
344
|
-
|
|
345
285
|
_defineProperty(Editor, "defaultProps", {
|
|
346
286
|
transformPastedHTML: _normalizeHTML.default
|
|
347
287
|
});
|
|
348
|
-
|
|
349
288
|
var _default = Editor;
|
|
350
289
|
exports.default = _default;
|
|
@@ -4,23 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.bpfrpt_proptype_EditorFramesetProps = exports.FRAMESET_BODY_CLASSNAME = void 0;
|
|
7
|
-
|
|
8
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
-
|
|
10
8
|
var React = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
require("./czi-editor-frameset.css");
|
|
13
|
-
|
|
14
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
|
|
16
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
-
|
|
18
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
|
|
20
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
14
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
16
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24
17
|
var bpfrpt_proptype_EditorFramesetProps = {
|
|
25
18
|
"body": _propTypes.default.node,
|
|
26
19
|
"className": _propTypes.default.string,
|
|
@@ -34,28 +27,22 @@ var bpfrpt_proptype_EditorFramesetProps = {
|
|
|
34
27
|
exports.bpfrpt_proptype_EditorFramesetProps = bpfrpt_proptype_EditorFramesetProps;
|
|
35
28
|
const FRAMESET_BODY_CLASSNAME = 'czi-editor-frame-body';
|
|
36
29
|
exports.FRAMESET_BODY_CLASSNAME = FRAMESET_BODY_CLASSNAME;
|
|
37
|
-
|
|
38
30
|
function toCSS(val) {
|
|
39
31
|
if (!val || val === 'auto') {
|
|
40
32
|
// '', 0, null, false, 'auto' are all treated as undefined
|
|
41
33
|
// instead of auto...
|
|
42
34
|
return undefined;
|
|
43
35
|
}
|
|
44
|
-
|
|
45
36
|
if (isNaN(val)) {
|
|
46
37
|
return `${val}`;
|
|
47
38
|
}
|
|
48
|
-
|
|
49
39
|
return `${val}px`;
|
|
50
40
|
}
|
|
51
|
-
|
|
52
41
|
class EditorFrameset extends React.PureComponent {
|
|
53
42
|
constructor() {
|
|
54
43
|
super(...arguments);
|
|
55
|
-
|
|
56
44
|
_defineProperty(this, "props", void 0);
|
|
57
45
|
}
|
|
58
|
-
|
|
59
46
|
render() {
|
|
60
47
|
const {
|
|
61
48
|
body,
|
|
@@ -94,8 +81,6 @@ class EditorFrameset extends React.PureComponent {
|
|
|
94
81
|
className: "czi-editor-frame-footer"
|
|
95
82
|
})));
|
|
96
83
|
}
|
|
97
|
-
|
|
98
84
|
}
|
|
99
|
-
|
|
100
85
|
var _default = EditorFrameset;
|
|
101
86
|
exports.default = _default;
|
package/dist/ui/EditorToolbar.js
CHANGED
|
@@ -4,62 +4,39 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
-
|
|
10
8
|
var _prosemirrorState = require("prosemirror-state");
|
|
11
|
-
|
|
12
9
|
var _prosemirrorTransform = require("prosemirror-transform");
|
|
13
|
-
|
|
14
10
|
var _prosemirrorView = require("prosemirror-view");
|
|
15
|
-
|
|
16
11
|
var React = _interopRequireWildcard(require("react"));
|
|
17
|
-
|
|
18
12
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
19
|
-
|
|
20
13
|
var _CommandButton = _interopRequireDefault(require("./CommandButton"));
|
|
21
|
-
|
|
22
14
|
var _CommandMenuButton = _interopRequireDefault(require("./CommandMenuButton"));
|
|
23
|
-
|
|
24
15
|
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
25
|
-
|
|
26
16
|
var _EditorToolbarConfig = require("./EditorToolbarConfig");
|
|
27
|
-
|
|
28
17
|
var _Icon = _interopRequireDefault(require("./Icon"));
|
|
29
|
-
|
|
30
18
|
var _ResizeObserver = _interopRequireDefault(require("./ResizeObserver"));
|
|
31
|
-
|
|
32
19
|
var _licitDocAttrsStep = require("@modusoperandi/licit-doc-attrs-step");
|
|
33
|
-
|
|
34
20
|
var _isReactClass = _interopRequireDefault(require("./isReactClass"));
|
|
35
|
-
|
|
36
21
|
require("./czi-editor-toolbar.css");
|
|
37
|
-
|
|
38
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
39
|
-
|
|
40
23
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
41
|
-
|
|
42
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
43
|
-
|
|
44
|
-
function
|
|
45
|
-
|
|
25
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
26
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
27
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
46
28
|
class EditorToolbar extends React.PureComponent {
|
|
47
29
|
constructor() {
|
|
48
30
|
super(...arguments);
|
|
49
|
-
|
|
50
31
|
_defineProperty(this, "_body", null);
|
|
51
|
-
|
|
52
32
|
_defineProperty(this, "props", void 0);
|
|
53
|
-
|
|
54
33
|
_defineProperty(this, "state", {
|
|
55
34
|
expanded: false,
|
|
56
35
|
wrapped: null
|
|
57
36
|
});
|
|
58
|
-
|
|
59
37
|
_defineProperty(this, "_renderButtonsGroup", (group, index) => {
|
|
60
38
|
const buttons = Object.keys(group).map(label => {
|
|
61
39
|
const obj = group[label];
|
|
62
|
-
|
|
63
40
|
if ((0, _isReactClass.default)(obj)) {
|
|
64
41
|
// JSX requies the component to be named with upper camel case.
|
|
65
42
|
const ThatComponent = obj;
|
|
@@ -87,7 +64,6 @@ class EditorToolbar extends React.PureComponent {
|
|
|
87
64
|
key: 'g' + String(index)
|
|
88
65
|
}, buttons);
|
|
89
66
|
});
|
|
90
|
-
|
|
91
67
|
_defineProperty(this, "_renderMenuButton", (label, commandGroups) => {
|
|
92
68
|
const {
|
|
93
69
|
editorState,
|
|
@@ -111,7 +87,6 @@ class EditorToolbar extends React.PureComponent {
|
|
|
111
87
|
title: title
|
|
112
88
|
});
|
|
113
89
|
});
|
|
114
|
-
|
|
115
90
|
_defineProperty(this, "_renderButton", (label, command) => {
|
|
116
91
|
const {
|
|
117
92
|
disabled,
|
|
@@ -135,36 +110,28 @@ class EditorToolbar extends React.PureComponent {
|
|
|
135
110
|
title: title
|
|
136
111
|
});
|
|
137
112
|
});
|
|
138
|
-
|
|
139
113
|
_defineProperty(this, "_onBodyRef", ref => {
|
|
140
114
|
if (ref) {
|
|
141
|
-
this._body = ref;
|
|
142
|
-
|
|
115
|
+
this._body = ref;
|
|
116
|
+
// Mounting
|
|
143
117
|
const el = _reactDom.default.findDOMNode(ref);
|
|
144
|
-
|
|
145
118
|
if (el instanceof HTMLElement) {
|
|
146
119
|
_ResizeObserver.default.observe(el, this._checkIfContentIsWrapped);
|
|
147
120
|
}
|
|
148
121
|
} else {
|
|
149
122
|
// Unmounting.
|
|
150
123
|
const el = this._body && _reactDom.default.findDOMNode(this._body);
|
|
151
|
-
|
|
152
124
|
if (el instanceof HTMLElement) {
|
|
153
125
|
_ResizeObserver.default.unobserve(el);
|
|
154
126
|
}
|
|
155
|
-
|
|
156
127
|
this._body = null;
|
|
157
128
|
}
|
|
158
129
|
});
|
|
159
|
-
|
|
160
130
|
_defineProperty(this, "_checkIfContentIsWrapped", () => {
|
|
161
131
|
const ref = this._body;
|
|
162
|
-
|
|
163
132
|
const el = ref && _reactDom.default.findDOMNode(ref);
|
|
164
|
-
|
|
165
133
|
const startAnchor = el && el.firstChild;
|
|
166
134
|
const endAnchor = el && el.lastChild;
|
|
167
|
-
|
|
168
135
|
if (startAnchor && endAnchor) {
|
|
169
136
|
const wrapped = startAnchor.offsetTop < endAnchor.offsetTop;
|
|
170
137
|
this.setState({
|
|
@@ -172,14 +139,12 @@ class EditorToolbar extends React.PureComponent {
|
|
|
172
139
|
});
|
|
173
140
|
}
|
|
174
141
|
});
|
|
175
|
-
|
|
176
142
|
_defineProperty(this, "_toggleExpansion", expanded => {
|
|
177
143
|
this.setState({
|
|
178
144
|
expanded: !expanded
|
|
179
145
|
});
|
|
180
146
|
});
|
|
181
147
|
}
|
|
182
|
-
|
|
183
148
|
render() {
|
|
184
149
|
const {
|
|
185
150
|
wrapped,
|
|
@@ -197,15 +162,16 @@ class EditorToolbar extends React.PureComponent {
|
|
|
197
162
|
onClick: this._toggleExpansion,
|
|
198
163
|
title: "More",
|
|
199
164
|
value: expanded
|
|
200
|
-
}) : null;
|
|
201
|
-
// supplied by plugins
|
|
165
|
+
}) : null;
|
|
202
166
|
|
|
203
|
-
|
|
167
|
+
// Start with static button controls and append any button groups
|
|
168
|
+
// supplied by plugins
|
|
169
|
+
const commandGroups = _EditorToolbarConfig.COMMAND_GROUPS.concat((this.props.editorState.plugins || []
|
|
170
|
+
// This should have been a simple property instead of a function:
|
|
204
171
|
// p => p.buttonGroup
|
|
205
172
|
// but changing it now would mean finding every plugin that was
|
|
206
173
|
// implemented this way.
|
|
207
174
|
).map(p => p.initButtonCommands && p.initButtonCommands()).filter(Boolean)).map(this._renderButtonsGroup).filter(Boolean);
|
|
208
|
-
|
|
209
175
|
return /*#__PURE__*/React.createElement("div", {
|
|
210
176
|
className: className
|
|
211
177
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -235,8 +201,6 @@ class EditorToolbar extends React.PureComponent {
|
|
|
235
201
|
className: "czi-editor-toolbar-footer"
|
|
236
202
|
})));
|
|
237
203
|
}
|
|
238
|
-
|
|
239
204
|
}
|
|
240
|
-
|
|
241
205
|
var _default = EditorToolbar;
|
|
242
206
|
exports.default = _default;
|
|
@@ -5,46 +5,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.TABLE_COMMANDS_GROUP = exports.COMMAND_GROUPS = void 0;
|
|
7
7
|
exports.parseLabel = parseLabel;
|
|
8
|
-
|
|
9
8
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
|
|
11
9
|
var EditorCommands = _interopRequireWildcard(require("../EditorCommands"));
|
|
12
|
-
|
|
13
10
|
var _FontSizeCommandMenuButton = _interopRequireDefault(require("./FontSizeCommandMenuButton"));
|
|
14
|
-
|
|
15
11
|
var _FontTypeCommandMenuButton = _interopRequireDefault(require("./FontTypeCommandMenuButton"));
|
|
16
|
-
|
|
17
12
|
var _ListTypeCommandButton = _interopRequireDefault(require("./ListTypeCommandButton"));
|
|
18
|
-
|
|
19
13
|
var _Icon = _interopRequireDefault(require("./Icon"));
|
|
20
|
-
|
|
21
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
-
|
|
23
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
24
|
-
|
|
25
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
26
|
-
|
|
27
17
|
// eslint-disable-next-line no-unused-vars
|
|
28
18
|
const ICON_LABEL_PATTERN = /\[([A-Za-z_\d]+)\](.*)/;
|
|
29
|
-
|
|
30
19
|
function parseLabel(input) {
|
|
31
20
|
const matched = input.match(ICON_LABEL_PATTERN);
|
|
32
|
-
|
|
33
21
|
if (matched) {
|
|
34
|
-
const [
|
|
22
|
+
const [
|
|
23
|
+
// eslint-disable-next-line no-unused-vars
|
|
35
24
|
all, icon, label] = matched;
|
|
36
25
|
return {
|
|
37
26
|
icon: icon ? _Icon.default.get(icon) : null,
|
|
38
27
|
title: label || null
|
|
39
28
|
};
|
|
40
29
|
}
|
|
41
|
-
|
|
42
30
|
return {
|
|
43
31
|
icon: null,
|
|
44
32
|
title: input || null
|
|
45
33
|
};
|
|
46
34
|
}
|
|
47
|
-
|
|
48
35
|
const {
|
|
49
36
|
// [FS][07-MAY-2020][IRAD-956]
|
|
50
37
|
// BLOCKQUOTE_TOGGLE,
|
|
@@ -105,16 +92,18 @@ const TABLE_COMMANDS_GROUP = [{
|
|
|
105
92
|
}, {
|
|
106
93
|
'Merge Cells': TABLE_MERGE_CELLS,
|
|
107
94
|
'Split Row': TABLE_SPLIT_ROW
|
|
108
|
-
},
|
|
95
|
+
},
|
|
96
|
+
// Disable these commands cause user rarely use them.
|
|
109
97
|
{
|
|
110
98
|
'Toggle Header Column': TABLE_TOGGLE_HEADER_COLUMN,
|
|
111
99
|
'Toggle Header Row': TABLE_TOGGLE_HEADER_ROW,
|
|
112
100
|
'Toggle Header Cells': TABLE_TOGGLE_HEADER_CELL
|
|
113
101
|
}, {
|
|
114
102
|
'Delete Table': TABLE_DELETE_TABLE
|
|
115
|
-
}];
|
|
116
|
-
// Fix: Toolbar is poorly organized.
|
|
103
|
+
}];
|
|
117
104
|
|
|
105
|
+
// [FS] IRAD-1012 2020-07-14
|
|
106
|
+
// Fix: Toolbar is poorly organized.
|
|
118
107
|
exports.TABLE_COMMANDS_GROUP = TABLE_COMMANDS_GROUP;
|
|
119
108
|
const COMMAND_GROUPS = [{
|
|
120
109
|
'[font_download] Font Type': _FontTypeCommandMenuButton.default
|
|
@@ -152,9 +141,10 @@ const COMMAND_GROUPS = [{
|
|
|
152
141
|
}],
|
|
153
142
|
'[grid_on] Table...': TABLE_COMMANDS_GROUP,
|
|
154
143
|
'[hr] Horizontal line': HR,
|
|
155
|
-
'[functions] Math': MATH_EDIT
|
|
156
|
-
// '[format_quote] Block quote': BLOCKQUOTE_TOGGLE,
|
|
144
|
+
'[functions] Math': MATH_EDIT
|
|
157
145
|
|
|
146
|
+
// [FS][07-MAY-2020][IRAD-956]
|
|
147
|
+
// '[format_quote] Block quote': BLOCKQUOTE_TOGGLE,
|
|
158
148
|
}, {
|
|
159
149
|
'[settings_overscan] Page layout': DOC_LAYOUT
|
|
160
150
|
}, {
|