@ones-editor/editor 3.0.3-beta.4 → 3.0.3-beta.5
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/@ones-editor/input-handlers/src/markdown-shortcuts/markdown-input-handler.d.ts +3 -0
- package/@ones-editor/input-handlers/src/markdown-shortcuts/match-block-style.d.ts +2 -1
- package/@ones-editor/input-handlers/src/markdown-shortcuts/types.d.ts +3 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +15 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -66931,9 +66931,11 @@ ${codeText}
|
|
|
66931
66931
|
});
|
|
66932
66932
|
return true;
|
|
66933
66933
|
}
|
|
66934
|
-
function matchBlockStyle(editor, containerId, blockIndex, offset) {
|
|
66935
|
-
if (
|
|
66936
|
-
|
|
66934
|
+
function matchBlockStyle(editor, containerId, blockIndex, offset, options) {
|
|
66935
|
+
if ((options == null ? void 0 : options.disableHeadingShortcuts) !== true) {
|
|
66936
|
+
if (matchHeading(editor, containerId, blockIndex, offset)) {
|
|
66937
|
+
return true;
|
|
66938
|
+
}
|
|
66937
66939
|
}
|
|
66938
66940
|
if (matchBlockQuote(editor, containerId, blockIndex, offset)) {
|
|
66939
66941
|
return true;
|
|
@@ -67038,12 +67040,15 @@ ${codeText}
|
|
|
67038
67040
|
return false;
|
|
67039
67041
|
}
|
|
67040
67042
|
class MarkdownInputHandler {
|
|
67043
|
+
constructor(options) {
|
|
67044
|
+
this.options = options;
|
|
67045
|
+
}
|
|
67041
67046
|
handleAfterInsertText(editor, containerId, blockIndex, offset, text2) {
|
|
67042
67047
|
if (text2 === " ") {
|
|
67043
67048
|
if (converterIntercept(editor, containerId)) {
|
|
67044
67049
|
return false;
|
|
67045
67050
|
}
|
|
67046
|
-
if (matchBlockStyle(editor, containerId, blockIndex, offset)) {
|
|
67051
|
+
if (matchBlockStyle(editor, containerId, blockIndex, offset, this.options)) {
|
|
67047
67052
|
return true;
|
|
67048
67053
|
}
|
|
67049
67054
|
if (matchTextStyle(editor, containerId, blockIndex, offset)) {
|
|
@@ -95968,7 +95973,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
95968
95973
|
}
|
|
95969
95974
|
}
|
|
95970
95975
|
});
|
|
95971
|
-
editor.version = "3.0.3-beta.
|
|
95976
|
+
editor.version = "3.0.3-beta.5";
|
|
95972
95977
|
return editor;
|
|
95973
95978
|
}
|
|
95974
95979
|
function isDoc(doc2) {
|
|
@@ -96102,7 +96107,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
96102
96107
|
OnesEditorDropTarget.register(editor);
|
|
96103
96108
|
OnesEditorTocProvider.register(editor);
|
|
96104
96109
|
OnesEditorExclusiveBlock.register(editor);
|
|
96105
|
-
editor.version = "3.0.3-beta.
|
|
96110
|
+
editor.version = "3.0.3-beta.5";
|
|
96106
96111
|
return editor;
|
|
96107
96112
|
}
|
|
96108
96113
|
async function showDocVersions(editor, options, serverUrl) {
|
|
@@ -96206,7 +96211,9 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
96206
96211
|
if (options.blockMenuButton === false)
|
|
96207
96212
|
addClass(editor.rootElement, "no-block-menu");
|
|
96208
96213
|
}
|
|
96209
|
-
editor.input.addHandler(new MarkdownInputHandler(
|
|
96214
|
+
editor.input.addHandler(new MarkdownInputHandler({
|
|
96215
|
+
disableHeadingShortcuts: true
|
|
96216
|
+
}));
|
|
96210
96217
|
editor.input.addHandler(new OnesEditorPasteHandler(editor));
|
|
96211
96218
|
editor.input.addHandler(new ListPasteHandler());
|
|
96212
96219
|
editor.doc.registerCallback(new HeadingBlockDocEvents(editor));
|
|
@@ -96230,7 +96237,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
96230
96237
|
}
|
|
96231
96238
|
}
|
|
96232
96239
|
});
|
|
96233
|
-
editor.version = "3.0.3-beta.
|
|
96240
|
+
editor.version = "3.0.3-beta.5";
|
|
96234
96241
|
return editor;
|
|
96235
96242
|
}
|
|
96236
96243
|
const emojis$1 = {
|