rme 0.2.3-alpha.8 → 0.2.3-alpha.9
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 +4 -0
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7894,6 +7894,7 @@ var ClipboardExtension = class extends PlainExtension2 {
|
|
|
7894
7894
|
return {
|
|
7895
7895
|
props: {
|
|
7896
7896
|
handlePaste: (view, event) => {
|
|
7897
|
+
console.log("handlePaste event", event);
|
|
7897
7898
|
const transformer = getTransformerByView(view);
|
|
7898
7899
|
const parser4 = transformer.stringToDoc;
|
|
7899
7900
|
const schema = view.state.schema;
|
|
@@ -7905,6 +7906,8 @@ var ClipboardExtension = class extends PlainExtension2 {
|
|
|
7905
7906
|
const text = clipboardData.getData("text/plain");
|
|
7906
7907
|
const html2 = clipboardData.getData("text/html");
|
|
7907
7908
|
if (html2.length === 0 && text.length === 0) return false;
|
|
7909
|
+
console.log("html", html2);
|
|
7910
|
+
console.log("text", text);
|
|
7908
7911
|
const domParser = DOMParser2.fromSchema(schema);
|
|
7909
7912
|
let dom;
|
|
7910
7913
|
if (html2.length === 0) {
|
|
@@ -7936,6 +7939,7 @@ var ClipboardExtension = class extends PlainExtension2 {
|
|
|
7936
7939
|
}
|
|
7937
7940
|
const slice = domParser.parseSlice(dom);
|
|
7938
7941
|
const node = isTextOnlySlice(slice);
|
|
7942
|
+
console.log("slice", slice, node);
|
|
7939
7943
|
if (node) {
|
|
7940
7944
|
if ((node.type.name === "html_image" || node.type.name === "md_image") && node.attrs.src) {
|
|
7941
7945
|
this.processImageNode(node, view);
|