rme 0.2.3-alpha.5 → 0.2.3-alpha.7
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/index.mjs +10 -2
- package/dist/index.mjs.map +3 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6205,6 +6205,8 @@ var Text_default = Text;
|
|
|
6205
6205
|
import { ProsemirrorDevTools } from "@remirror/dev";
|
|
6206
6206
|
|
|
6207
6207
|
// src/editor/components/SourceEditor/delegate.ts
|
|
6208
|
+
import { markdown } from "@codemirror/lang-markdown";
|
|
6209
|
+
import { CountExtension as CountExtension2 } from "@remirror/extension-count";
|
|
6208
6210
|
import { createReactManager } from "@remirror/react";
|
|
6209
6211
|
import { DocExtension } from "remirror/extensions";
|
|
6210
6212
|
|
|
@@ -6821,6 +6823,12 @@ var MarkdownParser = class {
|
|
|
6821
6823
|
constructor(schema, parserRules) {
|
|
6822
6824
|
this.schema = schema;
|
|
6823
6825
|
this.tokenizer = MarkdownIt("commonmark", { html: true }).disable(["emphasis", "autolink", "backticks", "entity", "reference", "link"]).enable(["table"]).use(markdown_it_html_inline_default).use(markdown_it_list_checkbox_default).use(markdown_it_mermaid_default).use(MarkdownItMath).use(MarkdownItImage);
|
|
6826
|
+
this.tokenizer.validateLink = (url) => {
|
|
6827
|
+
if (url.startsWith("data:")) {
|
|
6828
|
+
return true;
|
|
6829
|
+
}
|
|
6830
|
+
return MarkdownIt().validateLink(url);
|
|
6831
|
+
};
|
|
6824
6832
|
this.tokenHandlers = buildTokenHandlers(schema, parserRules);
|
|
6825
6833
|
}
|
|
6826
6834
|
parse(text) {
|
|
@@ -8022,6 +8030,7 @@ var ClipboardExtension = class extends PlainExtension2 {
|
|
|
8022
8030
|
const { state, dispatch } = view;
|
|
8023
8031
|
let tr = state.tr;
|
|
8024
8032
|
node.attrs.src = newSrc;
|
|
8033
|
+
node.attrs["data-rme-loading"] = null;
|
|
8025
8034
|
dispatch(tr);
|
|
8026
8035
|
}
|
|
8027
8036
|
};
|
|
@@ -24438,14 +24447,13 @@ LineCodeMirrorExtension = __decorateClass([
|
|
|
24438
24447
|
], LineCodeMirrorExtension);
|
|
24439
24448
|
|
|
24440
24449
|
// src/editor/components/SourceEditor/delegate.ts
|
|
24441
|
-
import { markdown } from "@codemirror/lang-markdown";
|
|
24442
|
-
import { CountExtension as CountExtension2 } from "@remirror/extension-count";
|
|
24443
24450
|
function createSourceCodeManager(options) {
|
|
24444
24451
|
return createReactManager(() => [
|
|
24445
24452
|
new CountExtension2({}),
|
|
24446
24453
|
new DocExtension({ content: "codeMirror" }),
|
|
24447
24454
|
new LineCodeMirrorExtension({
|
|
24448
24455
|
hideDecoration: true,
|
|
24456
|
+
showCopyButton: false,
|
|
24449
24457
|
extensions: [basicSetup, markdown()],
|
|
24450
24458
|
onCodemirrorViewLoad: options?.onCodemirrorViewLoad
|
|
24451
24459
|
})
|