@progress/kendo-editor-common 1.12.2-develop.5 → 1.12.2-develop.6
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/dist/cdn/js/kendo-editor-common.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/DOMSerializer.js +6 -7
- package/dist/es/align.js +3 -6
- package/dist/es/blockNode.js +11 -14
- package/dist/es/blockquote.js +2 -5
- package/dist/es/cleanFormatting.js +3 -6
- package/dist/es/config/align-rules.js +5 -7
- package/dist/es/config/commands.js +13 -9
- package/dist/es/config/constants.js +7 -9
- package/dist/es/config/indent-rules.js +3 -6
- package/dist/es/config/keymap.js +7 -10
- package/dist/es/config/list-settings.js +3 -5
- package/dist/es/config/schema.js +4 -6
- package/dist/es/find-replace.js +8 -10
- package/dist/es/flatten-spans.js +2 -5
- package/dist/es/image.js +2 -5
- package/dist/es/indent.js +11 -14
- package/dist/es/inline-style.js +10 -12
- package/dist/es/link.js +5 -8
- package/dist/es/listConvert.js +8 -9
- package/dist/es/lists.js +12 -15
- package/dist/es/main.js +34 -33
- package/dist/es/mark.js +16 -17
- package/dist/es/paste.js +10 -13
- package/dist/es/plugins/caret-color.js +5 -8
- package/dist/es/plugins/csp-fix.js +2 -5
- package/dist/es/plugins/highlight.js +3 -6
- package/dist/es/plugins/image-resize.js +8 -11
- package/dist/es/plugins/list-markers-styles.js +2 -5
- package/dist/es/plugins/placeholder.js +2 -5
- package/dist/es/plugins/resize-utils.js +2 -4
- package/dist/es/plugins/spaces-fix.js +1 -4
- package/dist/es/plugins/table-resize/column-resize.js +21 -24
- package/dist/es/plugins/table-resize/index.js +6 -9
- package/dist/es/plugins/table-resize/row-resize.js +23 -24
- package/dist/es/plugins/table-resize/table-resize.js +17 -20
- package/dist/es/plugins/table-resize/table-view.js +6 -9
- package/dist/es/plugins/table-resize/utils.js +10 -13
- package/dist/es/source.js +15 -18
- package/dist/es/table.js +15 -18
- package/dist/es/text.js +1 -3
- package/dist/es/types/active-marks.js +1 -0
- package/dist/es/types/command.js +1 -0
- package/dist/es/types/dispatchFn.js +1 -0
- package/dist/es/types/paste-cleanup-settings.js +1 -0
- package/dist/es/types/predicate.js +1 -0
- package/dist/es/utils.js +18 -21
- package/dist/npm/DOMSerializer.d.ts +35 -0
- package/dist/npm/DOMSerializer.js +10 -9
- package/dist/npm/align.d.ts +4 -7
- package/dist/npm/align.js +9 -10
- package/dist/npm/blockNode.d.ts +15 -12
- package/dist/npm/blockNode.js +28 -29
- package/dist/npm/blockquote.d.ts +2 -5
- package/dist/npm/blockquote.js +6 -7
- package/dist/npm/cleanFormatting.d.ts +3 -6
- package/dist/npm/cleanFormatting.js +7 -8
- package/dist/npm/config/align-rules.d.ts +6 -8
- package/dist/npm/config/align-rules.js +8 -13
- package/dist/npm/config/commands.d.ts +19 -11
- package/dist/npm/config/commands.js +16 -17
- package/dist/npm/config/constants.d.ts +7 -0
- package/dist/npm/config/constants.js +10 -17
- package/dist/npm/config/indent-rules.d.ts +4 -6
- package/dist/npm/config/indent-rules.js +8 -11
- package/dist/npm/config/keymap.d.ts +2 -5
- package/dist/npm/config/keymap.js +21 -22
- package/dist/npm/config/list-settings.d.ts +30 -0
- package/dist/npm/config/list-settings.js +10 -13
- package/dist/npm/config/schema.d.ts +2 -3
- package/dist/npm/config/schema.js +19 -20
- package/dist/npm/find-replace.d.ts +7 -10
- package/dist/npm/find-replace.js +20 -20
- package/dist/npm/flatten-spans.d.ts +1 -3
- package/dist/npm/flatten-spans.js +6 -7
- package/dist/npm/image.d.ts +3 -6
- package/dist/npm/image.js +5 -6
- package/dist/npm/indent.d.ts +9 -12
- package/dist/npm/indent.js +37 -38
- package/dist/npm/inline-style.d.ts +4 -7
- package/dist/npm/inline-style.js +28 -28
- package/dist/npm/link.d.ts +2 -4
- package/dist/npm/link.js +21 -22
- package/dist/npm/listConvert.d.ts +1 -3
- package/dist/npm/listConvert.js +13 -12
- package/dist/npm/lists.d.ts +8 -8
- package/dist/npm/lists.js +26 -27
- package/dist/npm/main.d.ts +34 -35
- package/dist/npm/main.js +214 -391
- package/dist/npm/mark.d.ts +17 -12
- package/dist/npm/mark.js +30 -29
- package/dist/npm/paste.d.ts +8 -11
- package/dist/npm/paste.js +19 -20
- package/dist/npm/plugins/caret-color.d.ts +2 -5
- package/dist/npm/plugins/caret-color.js +15 -17
- package/dist/npm/plugins/csp-fix.d.ts +1 -4
- package/dist/npm/plugins/csp-fix.js +8 -9
- package/dist/npm/plugins/highlight.d.ts +4 -7
- package/dist/npm/plugins/highlight.js +11 -13
- package/dist/npm/plugins/image-resize.d.ts +5 -7
- package/dist/npm/plugins/image-resize.js +35 -37
- package/dist/npm/plugins/list-markers-styles.d.ts +2 -5
- package/dist/npm/plugins/list-markers-styles.js +14 -16
- package/dist/npm/plugins/placeholder.d.ts +1 -4
- package/dist/npm/plugins/placeholder.js +10 -12
- package/dist/npm/plugins/resize-utils.d.ts +35 -0
- package/dist/npm/plugins/resize-utils.js +5 -7
- package/dist/npm/plugins/spaces-fix.d.ts +1 -4
- package/dist/npm/plugins/spaces-fix.js +9 -10
- package/dist/npm/plugins/table-resize/column-resize.d.ts +2 -0
- package/dist/npm/plugins/table-resize/column-resize.js +44 -46
- package/dist/npm/plugins/table-resize/index.d.ts +2 -5
- package/dist/npm/plugins/table-resize/index.js +13 -14
- package/dist/npm/plugins/table-resize/row-resize.d.ts +2 -0
- package/dist/npm/plugins/table-resize/row-resize.js +40 -40
- package/dist/npm/plugins/table-resize/table-resize.d.ts +18 -0
- package/dist/npm/plugins/table-resize/table-resize.js +51 -52
- package/dist/npm/plugins/table-resize/table-view.d.ts +28 -0
- package/dist/npm/plugins/table-resize/table-view.js +23 -24
- package/dist/npm/plugins/table-resize/utils.d.ts +17 -7
- package/dist/npm/plugins/table-resize/utils.js +24 -28
- package/dist/npm/source.d.ts +13 -16
- package/dist/npm/source.js +35 -36
- package/dist/npm/table.d.ts +9 -10
- package/dist/npm/table.js +33 -49
- package/dist/npm/text.d.ts +3 -6
- package/dist/npm/text.js +3 -3
- package/dist/npm/types/active-marks.d.ts +1 -4
- package/dist/npm/types/active-marks.js +2 -0
- package/dist/npm/types/command.d.ts +2 -5
- package/dist/npm/types/command.js +2 -0
- package/dist/npm/types/dispatchFn.d.ts +1 -4
- package/dist/npm/types/dispatchFn.js +2 -0
- package/dist/npm/types/paste-cleanup-settings.d.ts +1 -3
- package/dist/npm/types/paste-cleanup-settings.js +2 -0
- package/dist/npm/types/predicate.d.ts +1 -0
- package/dist/npm/types/predicate.js +2 -0
- package/dist/npm/utils.d.ts +33 -14
- package/dist/npm/utils.js +38 -39
- package/package.json +3 -50
- package/dist/es2015/DOMSerializer.js +0 -184
- package/dist/es2015/align.js +0 -43
- package/dist/es2015/blockNode.js +0 -180
- package/dist/es2015/blockquote.js +0 -26
- package/dist/es2015/cleanFormatting.js +0 -20
- package/dist/es2015/config/align-rules.js +0 -30
- package/dist/es2015/config/commands.js +0 -50
- package/dist/es2015/config/constants.js +0 -9
- package/dist/es2015/config/indent-rules.js +0 -42
- package/dist/es2015/config/keymap.js +0 -51
- package/dist/es2015/config/list-settings.js +0 -21
- package/dist/es2015/config/schema.js +0 -314
- package/dist/es2015/find-replace.js +0 -122
- package/dist/es2015/flatten-spans.js +0 -112
- package/dist/es2015/image.js +0 -10
- package/dist/es2015/indent.js +0 -105
- package/dist/es2015/inline-style.js +0 -177
- package/dist/es2015/link.js +0 -105
- package/dist/es2015/listConvert.js +0 -184
- package/dist/es2015/lists.js +0 -266
- package/dist/es2015/main.js +0 -44
- package/dist/es2015/mark.js +0 -239
- package/dist/es2015/node_modules/tslib/tslib.es6.js +0 -35
- package/dist/es2015/paste.js +0 -162
- package/dist/es2015/plugins/caret-color.js +0 -34
- package/dist/es2015/plugins/csp-fix.js +0 -51
- package/dist/es2015/plugins/highlight.js +0 -23
- package/dist/es2015/plugins/image-resize.js +0 -225
- package/dist/es2015/plugins/list-markers-styles.js +0 -104
- package/dist/es2015/plugins/placeholder.js +0 -27
- package/dist/es2015/plugins/resize-utils.js +0 -13
- package/dist/es2015/plugins/spaces-fix.js +0 -46
- package/dist/es2015/plugins/table-resize/column-resize.js +0 -267
- package/dist/es2015/plugins/table-resize/index.js +0 -12
- package/dist/es2015/plugins/table-resize/row-resize.js +0 -234
- package/dist/es2015/plugins/table-resize/table-resize.js +0 -278
- package/dist/es2015/plugins/table-resize/table-view.js +0 -128
- package/dist/es2015/plugins/table-resize/utils.js +0 -93
- package/dist/es2015/source.js +0 -251
- package/dist/es2015/table.js +0 -132
- package/dist/es2015/text.js +0 -5
- package/dist/es2015/utils.js +0 -289
package/dist/npm/listConvert.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.convertMsLists = void 0;
|
|
4
|
+
const source_1 = require("./source");
|
|
5
5
|
const msoListRegExp = /style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi;
|
|
6
6
|
const extractListLevels = (html) => {
|
|
7
7
|
html = html.replace(msoListRegExp, (match, list, level) => {
|
|
@@ -77,7 +77,7 @@ const listTypes = (p) => {
|
|
|
77
77
|
style: guessUnorderedListStyle(trimStartText(innerText(p)))
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
if (/^\s*\w+[
|
|
80
|
+
if (/^\s*\w+[.)][\u00a0 ]{2,}/.test(html)) {
|
|
81
81
|
return {
|
|
82
82
|
tag: 'ol',
|
|
83
83
|
style: guessOrderedListStyle(trimStartText(innerText(p)))
|
|
@@ -85,13 +85,14 @@ const listTypes = (p) => {
|
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
87
|
const convertToLi = (p) => {
|
|
88
|
-
|
|
88
|
+
const name = p.nodeName.toLowerCase();
|
|
89
|
+
let content;
|
|
89
90
|
if (p.firstChild && p.firstChild.nodeType === Node.COMMENT_NODE) {
|
|
90
91
|
p.removeChild(p.firstChild);
|
|
91
92
|
}
|
|
92
93
|
if (p.childNodes.length === 1) {
|
|
93
94
|
content = p.firstChild.nodeType === Node.TEXT_NODE ?
|
|
94
|
-
innerText(p) : p.firstChild.innerHTML.replace(/^\w+[
|
|
95
|
+
innerText(p) : p.firstChild.innerHTML.replace(/^\w+[.)]( )+ /, '');
|
|
95
96
|
}
|
|
96
97
|
else {
|
|
97
98
|
p.removeChild(p.firstChild);
|
|
@@ -113,11 +114,12 @@ const convertToLi = (p) => {
|
|
|
113
114
|
}
|
|
114
115
|
p.parentNode.removeChild(p);
|
|
115
116
|
const li = document.createElement('li');
|
|
116
|
-
li.appendChild(
|
|
117
|
+
li.appendChild((0, source_1.htmlToFragment)(content));
|
|
117
118
|
return li;
|
|
118
119
|
};
|
|
119
120
|
const toList = (blockNodes) => {
|
|
120
|
-
|
|
121
|
+
const levels = {};
|
|
122
|
+
let lastMargin = -1, li, rootMargin, rootIndex, lastRootLi, isLastRootLi, rootList, items, i, p, type, margin, list, listData;
|
|
121
123
|
for (i = 0; i < blockNodes.length; i++) {
|
|
122
124
|
p = blockNodes[i];
|
|
123
125
|
listData = {
|
|
@@ -176,11 +178,10 @@ const toList = (blockNodes) => {
|
|
|
176
178
|
}
|
|
177
179
|
};
|
|
178
180
|
const convertMsLists = (html) => {
|
|
179
|
-
const container =
|
|
181
|
+
const container = (0, source_1.htmlToFragment)(extractListLevels(html));
|
|
180
182
|
const groups = new Set();
|
|
181
183
|
mapListsCandidates(container.children, groups);
|
|
182
184
|
groups.forEach(listsCandidates => toList(listsCandidates));
|
|
183
|
-
return
|
|
185
|
+
return (0, source_1.fragmentToHtml)(container);
|
|
184
186
|
};
|
|
185
|
-
|
|
186
187
|
exports.convertMsLists = convertMsLists;
|
package/dist/npm/lists.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Node } from 'prosemirror-model';
|
|
1
|
+
import { NodeType, Node } from 'prosemirror-model';
|
|
2
2
|
import { EditorState, Transaction } from 'prosemirror-state';
|
|
3
3
|
import { EditorView } from 'prosemirror-view';
|
|
4
|
-
|
|
4
|
+
import { Command } from './types/command';
|
|
5
5
|
type ListOptions = {
|
|
6
6
|
listType: string;
|
|
7
7
|
orderedList: string;
|
|
@@ -15,9 +15,9 @@ type ListOptions = {
|
|
|
15
15
|
* @param attrs - The attributes of the list node
|
|
16
16
|
* @returns The extracted list-style-type.
|
|
17
17
|
*/
|
|
18
|
-
declare const listStyle: (attrs: Node["attrs"]) => string;
|
|
19
|
-
declare const toggleList: (state: EditorState, dispatch: (tr: Transaction) => void, view: EditorView, options: ListOptions, command?: string) => boolean;
|
|
20
|
-
declare function toggleUnorderedList(state: EditorState, dispatch: (tr: Transaction) => void, view: EditorView): any;
|
|
21
|
-
declare function toggleOrderedList(state: EditorState, dispatch: (tr: Transaction) => void, view: EditorView): any;
|
|
22
|
-
|
|
23
|
-
export {
|
|
18
|
+
export declare const listStyle: (attrs: Node["attrs"]) => string;
|
|
19
|
+
export declare const toggleList: (state: EditorState, dispatch: (tr: Transaction) => void, view: EditorView, options: ListOptions, command?: string) => boolean;
|
|
20
|
+
export declare function toggleUnorderedList(state: EditorState, dispatch: (tr: Transaction) => void, view: EditorView): any;
|
|
21
|
+
export declare function toggleOrderedList(state: EditorState, dispatch: (tr: Transaction) => void, view: EditorView): any;
|
|
22
|
+
export declare const splitListItemKeepMarks: (itemType: NodeType) => Command;
|
|
23
|
+
export {};
|
package/dist/npm/lists.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.splitListItemKeepMarks = exports.toggleList = exports.listStyle = void 0;
|
|
4
|
+
exports.toggleUnorderedList = toggleUnorderedList;
|
|
5
|
+
exports.toggleOrderedList = toggleOrderedList;
|
|
6
|
+
const prosemirror_model_1 = require("prosemirror-model");
|
|
7
|
+
const prosemirror_state_1 = require("prosemirror-state");
|
|
8
|
+
const prosemirror_transform_1 = require("prosemirror-transform");
|
|
9
|
+
const prosemirror_commands_1 = require("prosemirror-commands");
|
|
10
|
+
const prosemirror_schema_list_1 = require("prosemirror-schema-list");
|
|
11
|
+
const list_settings_1 = require("./config/list-settings");
|
|
10
12
|
const rootListDepth = (pos, nodes) => {
|
|
11
13
|
// Get the depth of the nearest ancestor list
|
|
12
14
|
const { bulletList, orderedList, listItem } = nodes;
|
|
@@ -105,10 +107,10 @@ function liftListItem(state, selection, tr, nodeType) {
|
|
|
105
107
|
const end = range.end;
|
|
106
108
|
const endOfList = $to.end(range.depth);
|
|
107
109
|
if (end < endOfList) {
|
|
108
|
-
tr.step(new
|
|
109
|
-
range = new
|
|
110
|
+
tr.step(new prosemirror_transform_1.ReplaceAroundStep(end - 1, endOfList, end, endOfList, new prosemirror_model_1.Slice(prosemirror_model_1.Fragment.from(listItemNodeType.create(undefined, range.parent.copy())), 1, 0), 1, true));
|
|
111
|
+
range = new prosemirror_model_1.NodeRange(tr.doc.resolve($from.pos), tr.doc.resolve(endOfList), range.depth);
|
|
110
112
|
}
|
|
111
|
-
return tr.lift(range,
|
|
113
|
+
return tr.lift(range, (0, prosemirror_transform_1.liftTarget)(range)).scrollIntoView();
|
|
112
114
|
}
|
|
113
115
|
function liftFollowingList(state, from, to, rootListDepthNum, tr, listItem) {
|
|
114
116
|
// Function will lift list item following selection to level-1.
|
|
@@ -124,7 +126,7 @@ function liftFollowingList(state, from, to, rootListDepthNum, tr, listItem) {
|
|
|
124
126
|
const start = tr.doc.resolve(tr.mapping.map(pos));
|
|
125
127
|
listDepth = start.depth;
|
|
126
128
|
const end = tr.doc.resolve(tr.mapping.map(pos + node.textContent.length));
|
|
127
|
-
const sel = new
|
|
129
|
+
const sel = new prosemirror_state_1.TextSelection(start, end);
|
|
128
130
|
tr = liftListItem(state, sel, tr, listItem);
|
|
129
131
|
}
|
|
130
132
|
}
|
|
@@ -191,12 +193,12 @@ function liftListItems(options) {
|
|
|
191
193
|
// Following condition will ensure that block types `paragraph`, `heading`, `codeBlock`, `blockquote`, `div` are lifted.
|
|
192
194
|
// isTextblock is true for paragraph, heading, codeBlock.
|
|
193
195
|
if (node.isTextblock || node.type.name === 'blockquote' || node.type.name === 'div') {
|
|
194
|
-
const sel = new
|
|
196
|
+
const sel = new prosemirror_state_1.NodeSelection(tr.doc.resolve(tr.mapping.map(pos)));
|
|
195
197
|
const range = sel.$from.blockRange(sel.$to);
|
|
196
198
|
if (!range || sel.$from.parent.type !== state.schema.nodes[options.listItem]) {
|
|
197
199
|
return;
|
|
198
200
|
}
|
|
199
|
-
const target = range &&
|
|
201
|
+
const target = range && (0, prosemirror_transform_1.liftTarget)(range);
|
|
200
202
|
if (target === undefined || target === null) {
|
|
201
203
|
return false;
|
|
202
204
|
}
|
|
@@ -210,9 +212,9 @@ function liftListItems(options) {
|
|
|
210
212
|
};
|
|
211
213
|
}
|
|
212
214
|
function wrapInList(nodeType, attrs = {}) {
|
|
213
|
-
return
|
|
215
|
+
return (0, prosemirror_commands_1.autoJoin)((0, prosemirror_schema_list_1.wrapInList)(nodeType, attrs), (before, after) => before.type === after.type && before.type === nodeType);
|
|
214
216
|
}
|
|
215
|
-
const reListStyle = /list
|
|
217
|
+
const reListStyle = /list-style-type:\s?([\w-]+)/;
|
|
216
218
|
/**
|
|
217
219
|
* Extracts list-style-type style from node's attributes.
|
|
218
220
|
*
|
|
@@ -224,13 +226,14 @@ const listStyle = (attrs) => {
|
|
|
224
226
|
const execArray = reListStyle.exec(styleAttr);
|
|
225
227
|
return (execArray && execArray[1]) || '';
|
|
226
228
|
};
|
|
229
|
+
exports.listStyle = listStyle;
|
|
227
230
|
const toggleList = (state, dispatch, view, options, command) => {
|
|
228
231
|
const { listType, listAttrs = { style: null } } = options;
|
|
229
232
|
const { selection } = state;
|
|
230
233
|
const fromNode = selection.$from.node(selection.$from.depth - 2);
|
|
231
234
|
const endNode = selection.$to.node(selection.$to.depth - 2);
|
|
232
|
-
if (!fromNode || fromNode.type.name !== listType || listStyle(fromNode.attrs) !== listStyle(listAttrs) ||
|
|
233
|
-
(!endNode || endNode.type.name !== listType || listStyle(endNode.attrs) !== listStyle(listAttrs))) {
|
|
235
|
+
if (!fromNode || fromNode.type.name !== listType || (0, exports.listStyle)(fromNode.attrs) !== (0, exports.listStyle)(listAttrs) ||
|
|
236
|
+
(!endNode || endNode.type.name !== listType || (0, exports.listStyle)(endNode.attrs) !== (0, exports.listStyle)(listAttrs))) {
|
|
234
237
|
return toggleListCommand(options)(state, dispatch, view);
|
|
235
238
|
}
|
|
236
239
|
else {
|
|
@@ -248,15 +251,16 @@ const toggleList = (state, dispatch, view, options, command) => {
|
|
|
248
251
|
return true;
|
|
249
252
|
}
|
|
250
253
|
};
|
|
254
|
+
exports.toggleList = toggleList;
|
|
251
255
|
function toggleUnorderedList(state, dispatch, view) {
|
|
252
|
-
return toggleList(state, dispatch, view, { listType:
|
|
256
|
+
return (0, exports.toggleList)(state, dispatch, view, { listType: list_settings_1.bulletList.listType, ...list_settings_1.bulletList.types });
|
|
253
257
|
}
|
|
254
258
|
function toggleOrderedList(state, dispatch, view) {
|
|
255
|
-
return toggleList(state, dispatch, view, { listType:
|
|
259
|
+
return (0, exports.toggleList)(state, dispatch, view, { listType: list_settings_1.orderedList.listType, ...list_settings_1.orderedList.types });
|
|
256
260
|
}
|
|
257
261
|
const splitListItemKeepMarks = (itemType) => (state, dispatch) => {
|
|
258
262
|
// see https://github.com/ProseMirror/prosemirror-commands/blob/master/src/commands.js#L321-L327
|
|
259
|
-
return
|
|
263
|
+
return (0, prosemirror_schema_list_1.splitListItem)(itemType)(state, tr => {
|
|
260
264
|
const marks = state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks());
|
|
261
265
|
if (marks) {
|
|
262
266
|
tr.ensureMarks(marks);
|
|
@@ -264,9 +268,4 @@ const splitListItemKeepMarks = (itemType) => (state, dispatch) => {
|
|
|
264
268
|
dispatch(tr);
|
|
265
269
|
});
|
|
266
270
|
};
|
|
267
|
-
|
|
268
|
-
exports.listStyle = listStyle;
|
|
269
271
|
exports.splitListItemKeepMarks = splitListItemKeepMarks;
|
|
270
|
-
exports.toggleList = toggleList;
|
|
271
|
-
exports.toggleOrderedList = toggleOrderedList;
|
|
272
|
-
exports.toggleUnorderedList = toggleUnorderedList;
|
package/dist/npm/main.d.ts
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { flattenNestedSpans } from './flatten-spans
|
|
3
|
-
export { applyInlineStyle, getInlineStyles, toggleInlineFormat } from './inline-style
|
|
4
|
-
export { applyLink, removeLink } from './link
|
|
5
|
-
export { insertText } from './text
|
|
6
|
-
export { insertImage } from './image
|
|
7
|
-
export { alignBlocks, isAligned } from './align
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export { blockquote, liftBlockquote } from './blockquote
|
|
14
|
-
export {
|
|
15
|
-
export { Command } from './types/command
|
|
16
|
-
export { alignCenterRules,
|
|
17
|
-
export { indentRules, outdentRules } from './config/indent-rules
|
|
18
|
-
export { PasteCleanupSettings } from './types/paste-cleanup-settings
|
|
19
|
-
export {
|
|
20
|
-
export { buildKeymap, buildListKeymap } from './config/keymap
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export { convertMsLists } from './listConvert
|
|
24
|
-
export {
|
|
25
|
-
export { placeholder } from './plugins/placeholder
|
|
26
|
-
export { spacesFix } from './plugins/spaces-fix
|
|
27
|
-
export { cspFix } from './plugins/csp-fix
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export { caretColor, caretColorKey } from './plugins/caret-color
|
|
31
|
-
export { tableResizing } from './plugins/table-resize
|
|
32
|
-
export {
|
|
1
|
+
export { getHtml, setHtml, parseContent, trimWhitespace, htmlToFragment, domToPmDoc, pmDocToFragment, fragmentToHtml, hasSameMarkup, removeComments } from './source';
|
|
2
|
+
export { flattenNestedSpans } from './flatten-spans';
|
|
3
|
+
export { applyInlineStyle, getInlineStyles, toggleInlineFormat } from './inline-style';
|
|
4
|
+
export { applyLink, removeLink } from './link';
|
|
5
|
+
export { insertText } from './text';
|
|
6
|
+
export { insertImage } from './image';
|
|
7
|
+
export { alignBlocks, isAligned } from './align';
|
|
8
|
+
export { cleanFormatting, type CleanFormattingOptions } from './cleanFormatting';
|
|
9
|
+
export { hasNode, activeNode, formatBlockElements, getBlockFormats, parentBlockFormat, changeTextBlock, blockNodes, cleanTextBlockFormatting } from './blockNode';
|
|
10
|
+
export { hasMark, getMark, getActiveMarks, removeAllMarks, cleanMarks, selectionMarks } from './mark';
|
|
11
|
+
export { indent, canIndentAsListItem, outdent, canOutdentAsListItem, isIndented, canBeIndented, indentBlocks } from './indent';
|
|
12
|
+
export { toggleOrderedList, toggleUnorderedList, toggleList, listStyle } from './lists';
|
|
13
|
+
export { blockquote, liftBlockquote } from './blockquote';
|
|
14
|
+
export { getSelectionText, getNodeFromSelection, selectedLineTextOnly, expandSelection, expandToWordWrap, canInsert, parentNode, insertNode, indentHtml } from './utils';
|
|
15
|
+
export { type Command } from './types/command';
|
|
16
|
+
export { alignLeftRules, alignCenterRules, alignRightRules, alignJustifyRules, alignRemoveRules } from './config/align-rules';
|
|
17
|
+
export { indentRules, outdentRules } from './config/indent-rules';
|
|
18
|
+
export { type PasteCleanupSettings } from './types/paste-cleanup-settings';
|
|
19
|
+
export { nodes, marks } from './config/schema';
|
|
20
|
+
export { buildKeymap, buildListKeymap } from './config/keymap';
|
|
21
|
+
export { bold, italic, underline, strikethrough, subscript, superscript, link, type InlineFormatOptions } from './config/commands';
|
|
22
|
+
export { sanitize, removeTag, pasteCleanup, sanitizeClassAttr, sanitizeStyleAttr, removeAttribute, replaceImageSourcesFromRtf } from './paste';
|
|
23
|
+
export { convertMsLists } from './listConvert';
|
|
24
|
+
export { find, findAt, findAll, replace, replaceAll, type SearchOptions } from './find-replace';
|
|
25
|
+
export { placeholder } from './plugins/placeholder';
|
|
26
|
+
export { spacesFix } from './plugins/spaces-fix';
|
|
27
|
+
export { cspFix } from './plugins/csp-fix';
|
|
28
|
+
export { textHighlight, textHighlightKey, type InlineDecoration } from './plugins/highlight';
|
|
29
|
+
export { imageResizing, imageResizeKey, type ImageResizeOptions } from './plugins/image-resize';
|
|
30
|
+
export { caretColor, caretColorKey } from './plugins/caret-color';
|
|
31
|
+
export { tableResizing, tableResizeKey, tableColumnResizeKey, tableRowResizeKey } from './plugins/table-resize';
|
|
32
|
+
export { listMarkersStyles, type ListMarkersStylesOptions } from './plugins/list-markers-styles';
|
|
33
33
|
export * from 'prosemirror-commands';
|
|
34
34
|
export * from 'prosemirror-dropcursor';
|
|
35
35
|
export * from 'prosemirror-gapcursor';
|
|
@@ -39,8 +39,7 @@ export * from 'prosemirror-keymap';
|
|
|
39
39
|
export * from 'prosemirror-model';
|
|
40
40
|
export * from 'prosemirror-schema-list';
|
|
41
41
|
export * from 'prosemirror-state';
|
|
42
|
-
export {
|
|
42
|
+
export { type TableEditingOptions, TableMap, type TableNodes, type TableNodesOptions, type TableRect, type TableRole, tableEditing, tableEditingKey, tableNodeTypes, tableNodes, fixTables, fixTablesKey, isInTable, deleteTable, inSameTable, type getFromDOM, type setDOMAttr, type CellAttributes, type CellSelectionJSON, CellSelection, type Rect, selectedRect, selectionCell, setCellAttr, goToNextCell, toggleHeader, toggleHeaderCell, toggleHeaderColumn, toggleHeaderRow, splitCell, splitCellWithType, type GetCellTypeOptions, mergeCells, deleteRow, rowIsHeader, addRow, addColSpan, addColumn, colCount, columnIsHeader, columnResizing, columnResizingPluginKey, updateColumnsOnResize, cellAround, findCell, removeColSpan, moveCellForward, nextCell } from 'prosemirror-tables';
|
|
43
43
|
export * from 'prosemirror-transform';
|
|
44
44
|
export * from 'prosemirror-view';
|
|
45
|
-
export {
|
|
46
|
-
export { tableColumnResizeKey, tableResizeKey, tableRowResizeKey } from './plugins/table-resize/utils.js';
|
|
45
|
+
export { createTable, addRowAfter, addRowBefore, addColumnBefore, addColumnAfter, deleteColumn, pmAddColumnBefore, pmAddColumnAfter, pmAddRowAfter, pmAddRowBefore, pmDeleteColumn } from './table';
|