@edifice.io/tiptap-extensions 2.0.0-develop-rc.13 → 2.0.0-develop-rc.15
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/README.md +8 -5
- package/dist/abbr/abbr.cjs +1 -32
- package/dist/abbr/abbr.cjs.map +1 -1
- package/dist/abbr/abbr.d.ts +13 -13
- package/dist/abbr/abbr.js +13 -17
- package/dist/abbr/abbr.js.map +1 -1
- package/dist/alert/alert.cjs +1 -32
- package/dist/alert/alert.cjs.map +1 -1
- package/dist/alert/alert.js +22 -20
- package/dist/alert/alert.js.map +1 -1
- package/dist/attachment/attachment-transformer.cjs +2 -0
- package/dist/attachment/attachment-transformer.cjs.map +1 -0
- package/dist/attachment/attachment-transformer.d.ts +12 -0
- package/dist/attachment/attachment-transformer.js +76 -0
- package/dist/attachment/attachment-transformer.js.map +1 -0
- package/dist/attachment/attachment.cjs +1 -73
- package/dist/attachment/attachment.cjs.map +1 -1
- package/dist/attachment/attachment.d.ts +7 -7
- package/dist/attachment/attachment.js +29 -40
- package/dist/attachment/attachment.js.map +1 -1
- package/dist/attachment/index.d.ts +1 -0
- package/dist/audio/audio.cjs +2 -52
- package/dist/audio/audio.cjs.map +1 -1
- package/dist/audio/audio.d.ts +14 -18
- package/dist/audio/audio.js +25 -28
- package/dist/audio/audio.js.map +1 -1
- package/dist/font-size/font-size.cjs +1 -48
- package/dist/font-size/font-size.cjs.map +1 -1
- package/dist/font-size/font-size.d.ts +14 -14
- package/dist/font-size/font-size.js +17 -29
- package/dist/font-size/font-size.js.map +1 -1
- package/dist/heading/heading.cjs +1 -61
- package/dist/heading/heading.cjs.map +1 -1
- package/dist/heading/heading.d.ts +13 -11
- package/dist/heading/heading.js +25 -39
- package/dist/heading/heading.js.map +1 -1
- package/dist/highlight/highlight.cjs +1 -25
- package/dist/highlight/highlight.cjs.map +1 -1
- package/dist/highlight/highlight.d.ts +1 -4
- package/dist/highlight/highlight.js +13 -11
- package/dist/highlight/highlight.js.map +1 -1
- package/dist/hyperlink/hyperlink.cjs +1 -47
- package/dist/hyperlink/hyperlink.cjs.map +1 -1
- package/dist/hyperlink/hyperlink.d.ts +25 -28
- package/dist/hyperlink/hyperlink.js +19 -21
- package/dist/hyperlink/hyperlink.js.map +1 -1
- package/dist/iframe/iframe.cjs +1 -69
- package/dist/iframe/iframe.cjs.map +1 -1
- package/dist/iframe/iframe.d.ts +15 -13
- package/dist/iframe/iframe.js +32 -48
- package/dist/iframe/iframe.js.map +1 -1
- package/dist/image/image.cjs +2 -0
- package/dist/image/image.cjs.map +1 -0
- package/dist/image/image.d.ts +26 -0
- package/dist/image/image.js +178 -0
- package/dist/image/image.js.map +1 -0
- package/dist/image/index.d.ts +3 -3
- package/dist/index.cjs +1 -43
- package/dist/index.js +24 -22
- package/dist/index.js.map +1 -1
- package/dist/line-height/line-height.cjs +1 -33
- package/dist/line-height/line-height.cjs.map +1 -1
- package/dist/line-height/line-height.js +15 -18
- package/dist/line-height/line-height.js.map +1 -1
- package/dist/linker/linker.cjs +1 -95
- package/dist/linker/linker.cjs.map +1 -1
- package/dist/linker/linker.d.ts +18 -18
- package/dist/linker/linker.js +49 -57
- package/dist/linker/linker.js.map +1 -1
- package/dist/mathjax/mathjax.cjs +1 -47
- package/dist/mathjax/mathjax.cjs.map +1 -1
- package/dist/mathjax/mathjax.js +20 -30
- package/dist/mathjax/mathjax.js.map +1 -1
- package/dist/paragraph/paragraph.cjs +1 -13
- package/dist/paragraph/paragraph.cjs.map +1 -1
- package/dist/paragraph/paragraph.d.ts +1 -4
- package/dist/paragraph/paragraph.js +8 -6
- package/dist/paragraph/paragraph.js.map +1 -1
- package/dist/speech-recognition/speech-recognition.cjs +1 -76
- package/dist/speech-recognition/speech-recognition.cjs.map +1 -1
- package/dist/speech-recognition/speech-recognition.d.ts +13 -13
- package/dist/speech-recognition/speech-recognition.js +36 -57
- package/dist/speech-recognition/speech-recognition.js.map +1 -1
- package/dist/speech-synthesis/speech-synthesis.cjs +1 -32
- package/dist/speech-synthesis/speech-synthesis.cjs.map +1 -1
- package/dist/speech-synthesis/speech-synthesis.d.ts +10 -10
- package/dist/speech-synthesis/speech-synthesis.js +10 -19
- package/dist/speech-synthesis/speech-synthesis.js.map +1 -1
- package/dist/table-cell/table-cell.cjs +1 -27
- package/dist/table-cell/table-cell.cjs.map +1 -1
- package/dist/table-cell/table-cell.d.ts +1 -4
- package/dist/table-cell/table-cell.js +12 -17
- package/dist/table-cell/table-cell.js.map +1 -1
- package/dist/transform/html-to-json/html-to-json.cjs +1 -4
- package/dist/transform/html-to-json/html-to-json.cjs.map +1 -1
- package/dist/transform/html-to-json/html-to-json.d.ts +1 -4
- package/dist/transform/html-to-json/html-to-json.js +4 -2
- package/dist/transform/html-to-json/html-to-json.js.map +1 -1
- package/dist/transform/json-to-html/json-to-html.cjs +1 -4
- package/dist/transform/json-to-html/json-to-html.cjs.map +1 -1
- package/dist/transform/json-to-html/json-to-html.js +4 -2
- package/dist/transform/json-to-html/json-to-html.js.map +1 -1
- package/dist/video/video.cjs +2 -111
- package/dist/video/video.cjs.map +1 -1
- package/dist/video/video.d.ts +20 -29
- package/dist/video/video.js +90 -114
- package/dist/video/video.js.map +1 -1
- package/package.json +24 -16
- package/dist/image/custom-image.cjs +0 -163
- package/dist/image/custom-image.cjs.map +0 -1
- package/dist/image/custom-image.d.ts +0 -27
- package/dist/image/custom-image.js +0 -181
- package/dist/image/custom-image.js.map +0 -1
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
export declare type Level = 1 | 2;
|
|
2
2
|
interface Options {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
levels: Level[];
|
|
4
|
+
HTMLAttributes: Record<string, any>;
|
|
5
5
|
}
|
|
6
|
-
declare module
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
declare module "@tiptap/core" {
|
|
7
|
+
interface Commands<ReturnType> {
|
|
8
|
+
customHeading: {
|
|
9
|
+
/**
|
|
10
|
+
* Apply Heading Level
|
|
11
|
+
*/
|
|
12
|
+
setCustomHeading: (attributes: {
|
|
13
|
+
level: Level;
|
|
14
|
+
}) => ReturnType;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
15
17
|
}
|
|
16
18
|
export declare const CustomHeading: import('@tiptap/core').Node<Options, any>;
|
|
17
19
|
export {};
|
package/dist/heading/heading.js
CHANGED
|
@@ -1,60 +1,46 @@
|
|
|
1
|
-
import { mergeAttributes } from
|
|
2
|
-
import { Heading } from
|
|
3
|
-
import
|
|
1
|
+
import { mergeAttributes } from "@tiptap/core";
|
|
2
|
+
import { Heading } from "@tiptap/extension-heading";
|
|
3
|
+
import "@tiptap/extension-text-style";
|
|
4
4
|
const CustomHeading = Heading.extend({
|
|
5
|
-
name:
|
|
5
|
+
name: "customHeading",
|
|
6
6
|
addOptions() {
|
|
7
7
|
var _a;
|
|
8
8
|
return {
|
|
9
|
-
...(
|
|
10
|
-
HTMLAttributes: {}
|
|
9
|
+
...(_a = this.parent) == null ? void 0 : _a.call(this),
|
|
10
|
+
HTMLAttributes: {}
|
|
11
11
|
};
|
|
12
12
|
},
|
|
13
13
|
parseHTML() {
|
|
14
14
|
return this.options.levels.map((level) => ({
|
|
15
15
|
tag: `h${level}`,
|
|
16
|
-
attrs: { level }
|
|
16
|
+
attrs: { level }
|
|
17
17
|
}));
|
|
18
18
|
},
|
|
19
19
|
renderHTML({ node, HTMLAttributes }) {
|
|
20
20
|
return [
|
|
21
|
-
`h${
|
|
22
|
-
this.options.levels.includes(node.attrs.level)
|
|
23
|
-
? node.attrs.level
|
|
24
|
-
: this.options.levels[0]
|
|
25
|
-
}`,
|
|
21
|
+
`h${this.options.levels.includes(node.attrs.level) ? node.attrs.level : this.options.levels[0]}`,
|
|
26
22
|
mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),
|
|
27
|
-
0
|
|
23
|
+
0
|
|
28
24
|
];
|
|
29
25
|
},
|
|
30
26
|
addCommands() {
|
|
31
27
|
return {
|
|
32
|
-
setCustomHeading:
|
|
33
|
-
(attributes)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
content.marks.forEach((mark) => {
|
|
45
|
-
mark.type.name === 'textStyle' &&
|
|
46
|
-
mark.attrs.fontSize &&
|
|
47
|
-
mark.attrs.fontSize !== null &&
|
|
48
|
-
(tr = tr.removeMark(pos, pos + node.nodeSize, mark.type));
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
}),
|
|
52
|
-
dispatch && dispatch(tr),
|
|
53
|
-
commands.setHeading({ level: attributes.level })
|
|
54
|
-
);
|
|
55
|
-
},
|
|
28
|
+
setCustomHeading: (attributes) => ({ tr, dispatch, commands }) => {
|
|
29
|
+
if (!this.options.levels.includes(attributes.level))
|
|
30
|
+
return !1;
|
|
31
|
+
const { selection } = tr, { from, to } = selection;
|
|
32
|
+
return tr.doc.nodesBetween(from, to, (node, pos) => {
|
|
33
|
+
node.isBlock && from >= pos && to <= pos + node.nodeSize && node.content.forEach((content) => {
|
|
34
|
+
content.marks.forEach((mark) => {
|
|
35
|
+
mark.type.name === "textStyle" && mark.attrs.fontSize && mark.attrs.fontSize !== null && (tr = tr.removeMark(pos, pos + node.nodeSize, mark.type));
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
}), dispatch && dispatch(tr), commands.setHeading({ level: attributes.level });
|
|
39
|
+
}
|
|
56
40
|
};
|
|
57
|
-
}
|
|
41
|
+
}
|
|
58
42
|
});
|
|
59
|
-
export {
|
|
43
|
+
export {
|
|
44
|
+
CustomHeading
|
|
45
|
+
};
|
|
60
46
|
//# sourceMappingURL=heading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.js","sources":["../../src/heading/heading.ts"],"sourcesContent":["import { mergeAttributes } from
|
|
1
|
+
{"version":3,"file":"heading.js","sources":["../../src/heading/heading.ts"],"sourcesContent":["import { mergeAttributes } from \"@tiptap/core\";\nimport { Heading } from \"@tiptap/extension-heading\";\nimport \"@tiptap/extension-text-style\";\n\nexport declare type Level = 1 | 2;\n\ninterface Options {\n levels: Level[];\n HTMLAttributes: Record<string, any>;\n}\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n customHeading: {\n /**\n * Apply Heading Level\n */\n setCustomHeading: (attributes: { level: Level }) => ReturnType;\n };\n }\n}\n\nexport const CustomHeading = Heading.extend<Options>({\n name: \"customHeading\",\n\n addOptions() {\n return {\n ...this.parent?.(),\n HTMLAttributes: {},\n };\n },\n\n parseHTML() {\n return this.options.levels.map((level: Level) => ({\n tag: `h${level}`,\n attrs: { level },\n }));\n },\n\n renderHTML({ node, HTMLAttributes }) {\n const hasLevel = this.options.levels.includes(node.attrs.level);\n const level = hasLevel ? node.attrs.level : this.options.levels[0];\n\n return [\n `h${level}`,\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n 0,\n ];\n },\n\n addCommands() {\n return {\n setCustomHeading:\n (attributes) =>\n ({ tr, dispatch, commands }) => {\n if (!this.options.levels.includes(attributes.level)) {\n return false;\n }\n\n const { selection } = tr;\n const { from, to } = selection;\n\n tr.doc.nodesBetween(from, to, (node, pos) => {\n if (node.isBlock && from >= pos && to <= pos + node.nodeSize) {\n /* get node content and iterate through */\n node.content.forEach((content) => {\n /* get content marks and iterate through */\n content.marks.forEach((mark) => {\n /* find textStyle mark and if has fontSize attrs */\n if (\n mark.type.name === \"textStyle\" &&\n mark.attrs[\"fontSize\"] &&\n mark.attrs[\"fontSize\"] !== null\n ) {\n /* remove any fontSize attr to reset heading style */\n tr = tr.removeMark(pos, pos + node.nodeSize, mark.type);\n }\n });\n });\n }\n });\n\n if (dispatch) {\n dispatch(tr);\n }\n return commands.setHeading({ level: attributes.level });\n },\n };\n },\n});\n"],"names":[],"mappings":";;;AAsBa,MAAA,gBAAgB,QAAQ,OAAgB;AAAA,EACnD,MAAM;AAAA,EAEN,aAAa;;AACJ,WAAA;AAAA,MACL,IAAG,UAAK,WAAL;AAAA,MACH,gBAAgB,CAAA;AAAA,IAClB;AAAA,EACF;AAAA,EAEA,YAAY;AACV,WAAO,KAAK,QAAQ,OAAO,IAAI,CAAC,WAAkB;AAAA,MAChD,KAAK,IAAI,KAAK;AAAA,MACd,OAAO,EAAE,MAAM;AAAA,IAAA,EACf;AAAA,EACJ;AAAA,EAEA,WAAW,EAAE,MAAM,kBAAkB;AAI5B,WAAA;AAAA,MACL,IAJe,KAAK,QAAQ,OAAO,SAAS,KAAK,MAAM,KAAK,IACrC,KAAK,MAAM,QAAQ,KAAK,QAAQ,OAAO,CAAC,CAGtD;AAAA,MACT,gBAAgB,KAAK,QAAQ,gBAAgB,cAAc;AAAA,MAC3D;AAAA,IACF;AAAA,EACF;AAAA,EAEA,cAAc;AACL,WAAA;AAAA,MACL,kBACE,CAAC,eACD,CAAC,EAAE,IAAI,UAAU,eAAe;AAC9B,YAAI,CAAC,KAAK,QAAQ,OAAO,SAAS,WAAW,KAAK;AACzC,iBAAA;AAGH,cAAA,EAAE,cAAc,IAChB,EAAE,MAAM,GAAA,IAAO;AAErB,kBAAG,IAAI,aAAa,MAAM,IAAI,CAAC,MAAM,QAAQ;AAC3C,UAAI,KAAK,WAAW,QAAQ,OAAO,MAAM,MAAM,KAAK,YAE7C,KAAA,QAAQ,QAAQ,CAAC,YAAY;AAExB,oBAAA,MAAM,QAAQ,CAAC,SAAS;AAE9B,cACE,KAAK,KAAK,SAAS,eACnB,KAAK,MAAM,YACX,KAAK,MAAM,aAAgB,SAG3B,KAAK,GAAG,WAAW,KAAK,MAAM,KAAK,UAAU,KAAK,IAAI;AAAA,YACxD,CACD;AAAA,UAAA,CACF;AAAA,QACH,CACD,GAEG,YACF,SAAS,EAAE,GAEN,SAAS,WAAW,EAAE,OAAO,WAAW,OAAO;AAAA,MAAA;AAAA,IAE5D;AAAA,EAAA;AAEJ,CAAC;"}
|
|
@@ -1,26 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3
|
-
const Highlight = require('@tiptap/extension-highlight'),
|
|
4
|
-
CustomHighlight = Highlight.extend({
|
|
5
|
-
name: 'customHighlight',
|
|
6
|
-
addOptions() {
|
|
7
|
-
var _a;
|
|
8
|
-
return {
|
|
9
|
-
...((_a = this.parent) == null ? void 0 : _a.call(this)),
|
|
10
|
-
multicolor: !0,
|
|
11
|
-
HTMLAttributes: {},
|
|
12
|
-
};
|
|
13
|
-
},
|
|
14
|
-
parseHTML() {
|
|
15
|
-
var _a;
|
|
16
|
-
return [
|
|
17
|
-
{
|
|
18
|
-
...((_a = this.parent) == null ? void 0 : _a.call(this)),
|
|
19
|
-
style: 'background-color',
|
|
20
|
-
getAttrs: (style) => ({ color: style }),
|
|
21
|
-
},
|
|
22
|
-
];
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
exports.CustomHighlight = CustomHighlight;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Highlight=require("@tiptap/extension-highlight"),CustomHighlight=Highlight.extend({name:"customHighlight",addOptions(){var _a;return{...(_a=this.parent)==null?void 0:_a.call(this),multicolor:!0,HTMLAttributes:{}}},parseHTML(){var _a;return[{...(_a=this.parent)==null?void 0:_a.call(this),style:"background-color",getAttrs:style=>({color:style})}]}});exports.CustomHighlight=CustomHighlight;
|
|
26
2
|
//# sourceMappingURL=highlight.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight.cjs","sources":["../../src/highlight/highlight.ts"],"sourcesContent":["import Highlight from
|
|
1
|
+
{"version":3,"file":"highlight.cjs","sources":["../../src/highlight/highlight.ts"],"sourcesContent":["import Highlight from \"@tiptap/extension-highlight\";\n\nexport const CustomHighlight = Highlight.extend({\n name: \"customHighlight\",\n\n addOptions() {\n return {\n ...this.parent?.(),\n multicolor: true,\n HTMLAttributes: {},\n };\n },\n\n parseHTML() {\n return [\n {\n ...this.parent?.(),\n style: \"background-color\",\n getAttrs: (style) => {\n return {\n color: style,\n };\n },\n },\n ];\n },\n});\n"],"names":[],"mappings":"uIAEa,gBAAkB,UAAU,OAAO,CAC9C,KAAM,kBAEN,YAAa,QACJ,MAAA,CACL,IAAG,QAAK,SAAL,0BACH,WAAY,GACZ,eAAgB,CAAA,CAClB,CACF,EAEA,WAAY,QACH,MAAA,CACL,CACE,IAAG,QAAK,SAAL,0BACH,MAAO,mBACP,SAAW,QACF,CACL,MAAO,KACT,EACF,CAEJ,CAAA,CAEJ,CAAC"}
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
import Highlight from
|
|
1
|
+
import Highlight from "@tiptap/extension-highlight";
|
|
2
2
|
const CustomHighlight = Highlight.extend({
|
|
3
|
-
name:
|
|
3
|
+
name: "customHighlight",
|
|
4
4
|
addOptions() {
|
|
5
5
|
var _a;
|
|
6
6
|
return {
|
|
7
|
-
...(
|
|
7
|
+
...(_a = this.parent) == null ? void 0 : _a.call(this),
|
|
8
8
|
multicolor: !0,
|
|
9
|
-
HTMLAttributes: {}
|
|
9
|
+
HTMLAttributes: {}
|
|
10
10
|
};
|
|
11
11
|
},
|
|
12
12
|
parseHTML() {
|
|
13
13
|
var _a;
|
|
14
14
|
return [
|
|
15
15
|
{
|
|
16
|
-
...(
|
|
17
|
-
style:
|
|
16
|
+
...(_a = this.parent) == null ? void 0 : _a.call(this),
|
|
17
|
+
style: "background-color",
|
|
18
18
|
getAttrs: (style) => ({
|
|
19
|
-
color: style
|
|
20
|
-
})
|
|
21
|
-
}
|
|
19
|
+
color: style
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
22
|
];
|
|
23
|
-
}
|
|
23
|
+
}
|
|
24
24
|
});
|
|
25
|
-
export {
|
|
25
|
+
export {
|
|
26
|
+
CustomHighlight
|
|
27
|
+
};
|
|
26
28
|
//# sourceMappingURL=highlight.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight.js","sources":["../../src/highlight/highlight.ts"],"sourcesContent":["import Highlight from
|
|
1
|
+
{"version":3,"file":"highlight.js","sources":["../../src/highlight/highlight.ts"],"sourcesContent":["import Highlight from \"@tiptap/extension-highlight\";\n\nexport const CustomHighlight = Highlight.extend({\n name: \"customHighlight\",\n\n addOptions() {\n return {\n ...this.parent?.(),\n multicolor: true,\n HTMLAttributes: {},\n };\n },\n\n parseHTML() {\n return [\n {\n ...this.parent?.(),\n style: \"background-color\",\n getAttrs: (style) => {\n return {\n color: style,\n };\n },\n },\n ];\n },\n});\n"],"names":[],"mappings":";AAEa,MAAA,kBAAkB,UAAU,OAAO;AAAA,EAC9C,MAAM;AAAA,EAEN,aAAa;;AACJ,WAAA;AAAA,MACL,IAAG,UAAK,WAAL;AAAA,MACH,YAAY;AAAA,MACZ,gBAAgB,CAAA;AAAA,IAClB;AAAA,EACF;AAAA,EAEA,YAAY;;AACH,WAAA;AAAA,MACL;AAAA,QACE,IAAG,UAAK,WAAL;AAAA,QACH,OAAO;AAAA,QACP,UAAU,CAAC,WACF;AAAA,UACL,OAAO;AAAA,QACT;AAAA,MACF;AAAA,IAEJ;AAAA,EAAA;AAEJ,CAAC;"}
|
|
@@ -1,48 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3
|
-
const extensionLink = require('@tiptap/extension-link'),
|
|
4
|
-
Hyperlink = extensionLink.Link.extend({
|
|
5
|
-
name: 'hyperlink',
|
|
6
|
-
parseHTML() {
|
|
7
|
-
return [
|
|
8
|
-
{
|
|
9
|
-
tag: 'a[href]:not([href *= "javascript:" i])',
|
|
10
|
-
getAttrs: (node) => {
|
|
11
|
-
if (
|
|
12
|
-
node.getAttribute('data-id') &&
|
|
13
|
-
node.getAttribute('data-app-prefix')
|
|
14
|
-
)
|
|
15
|
-
return !1;
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
];
|
|
19
|
-
},
|
|
20
|
-
addOptions() {
|
|
21
|
-
var _a, _b;
|
|
22
|
-
return {
|
|
23
|
-
...((_a = this.parent) == null ? void 0 : _a.call(this)),
|
|
24
|
-
openOnClick: !1,
|
|
25
|
-
HTMLAttributes: {
|
|
26
|
-
...((_b = this.parent) == null
|
|
27
|
-
? void 0
|
|
28
|
-
: _b.call(this).HTMLAttributes),
|
|
29
|
-
target: null,
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
addAttributes() {
|
|
34
|
-
var _a;
|
|
35
|
-
return {
|
|
36
|
-
...((_a = this.parent) == null ? void 0 : _a.call(this)),
|
|
37
|
-
target: {
|
|
38
|
-
default: this.options.HTMLAttributes.target,
|
|
39
|
-
parseHTML: (element) =>
|
|
40
|
-
element.getAttribute('target') !== '_blank' ? null : '_blank',
|
|
41
|
-
renderHTML: (attributes) => ({ target: attributes.target }),
|
|
42
|
-
},
|
|
43
|
-
title: { default: this.options.HTMLAttributes.title },
|
|
44
|
-
};
|
|
45
|
-
},
|
|
46
|
-
});
|
|
47
|
-
exports.Hyperlink = Hyperlink;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const extensionLink=require("@tiptap/extension-link"),Hyperlink=extensionLink.Link.extend({name:"hyperlink",parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])',getAttrs:node=>{if(node.getAttribute("data-id")&&node.getAttribute("data-app-prefix"))return!1}}]},addOptions(){var _a,_b;return{...(_a=this.parent)==null?void 0:_a.call(this),openOnClick:!1,HTMLAttributes:{...(_b=this.parent)==null?void 0:_b.call(this).HTMLAttributes,target:null}}},addAttributes(){var _a;return{...(_a=this.parent)==null?void 0:_a.call(this),target:{default:this.options.HTMLAttributes.target,parseHTML:element=>element.getAttribute("target")!=="_blank"?null:"_blank",renderHTML:attributes=>({target:attributes.target})},title:{default:this.options.HTMLAttributes.title}}}});exports.Hyperlink=Hyperlink;
|
|
48
2
|
//# sourceMappingURL=hyperlink.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hyperlink.cjs","sources":["../../src/hyperlink/hyperlink.ts"],"sourcesContent":["import { Link } from
|
|
1
|
+
{"version":3,"file":"hyperlink.cjs","sources":["../../src/hyperlink/hyperlink.ts"],"sourcesContent":["import { Link } from \"@tiptap/extension-link\";\n\n/** Our own model of an hyperlink in a rich document. */\nexport type HyperlinkAttributes = {\n href: string | null;\n target: \"_blank\" | null;\n title: string | null;\n text: string | null;\n};\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n hyperlink: {\n /**\n * Set an hyperlink mark\n */\n setLink: (attributes: Partial<HyperlinkAttributes>) => ReturnType;\n /**\n * Toggle an hyperlink mark\n */\n toggleLink: (attributes: {\n href: string;\n target?: string | null;\n }) => ReturnType;\n /**\n * Unset an hyperlink mark\n */\n unsetLink: () => ReturnType;\n };\n }\n}\n\n/**\n * Hyperlink (external links), extends `Link` extension from TipTap.\n *\n * Links to external resources MUST NOT have a `data-id` nor a `data-app-prefix` attribute.\n * The `target` attribute has to be sanitized, so it is overriden.\n */\nexport const Hyperlink = Link.extend({\n name: \"hyperlink\",\n\n parseHTML() {\n return [\n {\n tag: 'a[href]:not([href *= \"javascript:\" i])',\n // Be sure no data-id and data-app-prefix attribute exists :\n // it would then be an Linker, not an Hyperlink !\n getAttrs: (node: HTMLAnchorElement) => {\n // See https://prosemirror.net/docs/ref/version/0.18.0.html#model.ParseRule.getAttrs\n if (\n node.getAttribute(\"data-id\") &&\n node.getAttribute(\"data-app-prefix\")\n )\n return false;\n },\n },\n ];\n },\n\n addOptions() {\n return {\n ...this.parent?.(),\n openOnClick: false,\n HTMLAttributes: {\n ...this.parent?.().HTMLAttributes,\n target: null,\n },\n };\n },\n\n /* Manage `title` and `target` attributes. */\n addAttributes() {\n return {\n // Preserve attributes of parent extension...\n ...this.parent?.(),\n // ...then add or override the following :\n //------------------\n target: {\n default: this.options.HTMLAttributes.target,\n // Sanitize target value\n parseHTML: (element) =>\n element.getAttribute(\"target\") !== \"_blank\" ? null : \"_blank\",\n renderHTML: (attributes) => ({\n target: attributes[\"target\"],\n }),\n },\n title: {\n default: this.options.HTMLAttributes.title,\n },\n };\n },\n});\n"],"names":["Link"],"mappings":"sIAsCa,UAAYA,mBAAK,OAAO,CACnC,KAAM,YAEN,WAAY,CACH,MAAA,CACL,CACE,IAAK,yCAGL,SAAW,MAA4B,CAErC,GACE,KAAK,aAAa,SAAS,GAC3B,KAAK,aAAa,iBAAiB,EAE5B,MAAA,EAAA,CACX,CAEJ,CACF,EAEA,YAAa,WACJ,MAAA,CACL,IAAG,QAAK,SAAL,0BACH,YAAa,GACb,eAAgB,CACd,IAAG,QAAK,SAAL,0BAAgB,eACnB,OAAQ,IAAA,CAEZ,CACF,EAGA,eAAgB,QACP,MAAA,CAEL,IAAG,QAAK,SAAL,0BAGH,OAAQ,CACN,QAAS,KAAK,QAAQ,eAAe,OAErC,UAAY,SACV,QAAQ,aAAa,QAAQ,IAAM,SAAW,KAAO,SACvD,WAAa,aAAgB,CAC3B,OAAQ,WAAW,MACrB,EACF,EACA,MAAO,CACL,QAAS,KAAK,QAAQ,eAAe,KAAA,CAEzC,CAAA,CAEJ,CAAC"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/** Our own model of an hyperlink in a rich document. */
|
|
2
2
|
export type HyperlinkAttributes = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
href: string | null;
|
|
4
|
+
target: "_blank" | null;
|
|
5
|
+
title: string | null;
|
|
6
|
+
text: string | null;
|
|
7
7
|
};
|
|
8
|
-
declare module
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
declare module "@tiptap/core" {
|
|
9
|
+
interface Commands<ReturnType> {
|
|
10
|
+
hyperlink: {
|
|
11
|
+
/**
|
|
12
|
+
* Set an hyperlink mark
|
|
13
|
+
*/
|
|
14
|
+
setLink: (attributes: Partial<HyperlinkAttributes>) => ReturnType;
|
|
15
|
+
/**
|
|
16
|
+
* Toggle an hyperlink mark
|
|
17
|
+
*/
|
|
18
|
+
toggleLink: (attributes: {
|
|
19
|
+
href: string;
|
|
20
|
+
target?: string | null;
|
|
21
|
+
}) => ReturnType;
|
|
22
|
+
/**
|
|
23
|
+
* Unset an hyperlink mark
|
|
24
|
+
*/
|
|
25
|
+
unsetLink: () => ReturnType;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Hyperlink (external links), extends `Link` extension from TipTap.
|
|
@@ -32,7 +32,4 @@ declare module '@tiptap/core' {
|
|
|
32
32
|
* Links to external resources MUST NOT have a `data-id` nor a `data-app-prefix` attribute.
|
|
33
33
|
* The `target` attribute has to be sanitized, so it is overriden.
|
|
34
34
|
*/
|
|
35
|
-
export declare const Hyperlink: import('@tiptap/core').Mark<
|
|
36
|
-
import('@tiptap/extension-link').LinkOptions,
|
|
37
|
-
any
|
|
38
|
-
>;
|
|
35
|
+
export declare const Hyperlink: import('@tiptap/core').Mark<import('@tiptap/extension-link').LinkOptions, any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Link } from
|
|
1
|
+
import { Link } from "@tiptap/extension-link";
|
|
2
2
|
const Hyperlink = Link.extend({
|
|
3
|
-
name:
|
|
3
|
+
name: "hyperlink",
|
|
4
4
|
parseHTML() {
|
|
5
5
|
return [
|
|
6
6
|
{
|
|
@@ -8,24 +8,21 @@ const Hyperlink = Link.extend({
|
|
|
8
8
|
// Be sure no data-id and data-app-prefix attribute exists :
|
|
9
9
|
// it would then be an Linker, not an Hyperlink !
|
|
10
10
|
getAttrs: (node) => {
|
|
11
|
-
if (
|
|
12
|
-
node.getAttribute('data-id') &&
|
|
13
|
-
node.getAttribute('data-app-prefix')
|
|
14
|
-
)
|
|
11
|
+
if (node.getAttribute("data-id") && node.getAttribute("data-app-prefix"))
|
|
15
12
|
return !1;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
18
15
|
];
|
|
19
16
|
},
|
|
20
17
|
addOptions() {
|
|
21
18
|
var _a, _b;
|
|
22
19
|
return {
|
|
23
|
-
...(
|
|
20
|
+
...(_a = this.parent) == null ? void 0 : _a.call(this),
|
|
24
21
|
openOnClick: !1,
|
|
25
22
|
HTMLAttributes: {
|
|
26
|
-
...(
|
|
27
|
-
target: null
|
|
28
|
-
}
|
|
23
|
+
...(_b = this.parent) == null ? void 0 : _b.call(this).HTMLAttributes,
|
|
24
|
+
target: null
|
|
25
|
+
}
|
|
29
26
|
};
|
|
30
27
|
},
|
|
31
28
|
/* Manage `title` and `target` attributes. */
|
|
@@ -33,23 +30,24 @@ const Hyperlink = Link.extend({
|
|
|
33
30
|
var _a;
|
|
34
31
|
return {
|
|
35
32
|
// Preserve attributes of parent extension...
|
|
36
|
-
...(
|
|
33
|
+
...(_a = this.parent) == null ? void 0 : _a.call(this),
|
|
37
34
|
// ...then add or override the following :
|
|
38
35
|
//------------------
|
|
39
36
|
target: {
|
|
40
37
|
default: this.options.HTMLAttributes.target,
|
|
41
38
|
// Sanitize target value
|
|
42
|
-
parseHTML: (element) =>
|
|
43
|
-
element.getAttribute('target') !== '_blank' ? null : '_blank',
|
|
39
|
+
parseHTML: (element) => element.getAttribute("target") !== "_blank" ? null : "_blank",
|
|
44
40
|
renderHTML: (attributes) => ({
|
|
45
|
-
target: attributes.target
|
|
46
|
-
})
|
|
41
|
+
target: attributes.target
|
|
42
|
+
})
|
|
47
43
|
},
|
|
48
44
|
title: {
|
|
49
|
-
default: this.options.HTMLAttributes.title
|
|
50
|
-
}
|
|
45
|
+
default: this.options.HTMLAttributes.title
|
|
46
|
+
}
|
|
51
47
|
};
|
|
52
|
-
}
|
|
48
|
+
}
|
|
53
49
|
});
|
|
54
|
-
export {
|
|
50
|
+
export {
|
|
51
|
+
Hyperlink
|
|
52
|
+
};
|
|
55
53
|
//# sourceMappingURL=hyperlink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hyperlink.js","sources":["../../src/hyperlink/hyperlink.ts"],"sourcesContent":["import { Link } from
|
|
1
|
+
{"version":3,"file":"hyperlink.js","sources":["../../src/hyperlink/hyperlink.ts"],"sourcesContent":["import { Link } from \"@tiptap/extension-link\";\n\n/** Our own model of an hyperlink in a rich document. */\nexport type HyperlinkAttributes = {\n href: string | null;\n target: \"_blank\" | null;\n title: string | null;\n text: string | null;\n};\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n hyperlink: {\n /**\n * Set an hyperlink mark\n */\n setLink: (attributes: Partial<HyperlinkAttributes>) => ReturnType;\n /**\n * Toggle an hyperlink mark\n */\n toggleLink: (attributes: {\n href: string;\n target?: string | null;\n }) => ReturnType;\n /**\n * Unset an hyperlink mark\n */\n unsetLink: () => ReturnType;\n };\n }\n}\n\n/**\n * Hyperlink (external links), extends `Link` extension from TipTap.\n *\n * Links to external resources MUST NOT have a `data-id` nor a `data-app-prefix` attribute.\n * The `target` attribute has to be sanitized, so it is overriden.\n */\nexport const Hyperlink = Link.extend({\n name: \"hyperlink\",\n\n parseHTML() {\n return [\n {\n tag: 'a[href]:not([href *= \"javascript:\" i])',\n // Be sure no data-id and data-app-prefix attribute exists :\n // it would then be an Linker, not an Hyperlink !\n getAttrs: (node: HTMLAnchorElement) => {\n // See https://prosemirror.net/docs/ref/version/0.18.0.html#model.ParseRule.getAttrs\n if (\n node.getAttribute(\"data-id\") &&\n node.getAttribute(\"data-app-prefix\")\n )\n return false;\n },\n },\n ];\n },\n\n addOptions() {\n return {\n ...this.parent?.(),\n openOnClick: false,\n HTMLAttributes: {\n ...this.parent?.().HTMLAttributes,\n target: null,\n },\n };\n },\n\n /* Manage `title` and `target` attributes. */\n addAttributes() {\n return {\n // Preserve attributes of parent extension...\n ...this.parent?.(),\n // ...then add or override the following :\n //------------------\n target: {\n default: this.options.HTMLAttributes.target,\n // Sanitize target value\n parseHTML: (element) =>\n element.getAttribute(\"target\") !== \"_blank\" ? null : \"_blank\",\n renderHTML: (attributes) => ({\n target: attributes[\"target\"],\n }),\n },\n title: {\n default: this.options.HTMLAttributes.title,\n },\n };\n },\n});\n"],"names":[],"mappings":";AAsCa,MAAA,YAAY,KAAK,OAAO;AAAA,EACnC,MAAM;AAAA,EAEN,YAAY;AACH,WAAA;AAAA,MACL;AAAA,QACE,KAAK;AAAA;AAAA;AAAA,QAGL,UAAU,CAAC,SAA4B;AAErC,cACE,KAAK,aAAa,SAAS,KAC3B,KAAK,aAAa,iBAAiB;AAE5B,mBAAA;AAAA,QAAA;AAAA,MACX;AAAA,IAEJ;AAAA,EACF;AAAA,EAEA,aAAa;;AACJ,WAAA;AAAA,MACL,IAAG,UAAK,WAAL;AAAA,MACH,aAAa;AAAA,MACb,gBAAgB;AAAA,QACd,IAAG,UAAK,WAAL,8BAAgB;AAAA,QACnB,QAAQ;AAAA,MAAA;AAAA,IAEZ;AAAA,EACF;AAAA;AAAA,EAGA,gBAAgB;;AACP,WAAA;AAAA;AAAA,MAEL,IAAG,UAAK,WAAL;AAAA;AAAA;AAAA,MAGH,QAAQ;AAAA,QACN,SAAS,KAAK,QAAQ,eAAe;AAAA;AAAA,QAErC,WAAW,CAAC,YACV,QAAQ,aAAa,QAAQ,MAAM,WAAW,OAAO;AAAA,QACvD,YAAY,CAAC,gBAAgB;AAAA,UAC3B,QAAQ,WAAW;AAAA,QACrB;AAAA,MACF;AAAA,MACA,OAAO;AAAA,QACL,SAAS,KAAK,QAAQ,eAAe;AAAA,MAAA;AAAA,IAEzC;AAAA,EAAA;AAEJ,CAAC;"}
|
package/dist/iframe/iframe.cjs
CHANGED
|
@@ -1,70 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3
|
-
const core = require('@tiptap/core'),
|
|
4
|
-
Iframe = core.Node.create({
|
|
5
|
-
name: 'iframe',
|
|
6
|
-
group: 'block',
|
|
7
|
-
atom: !0,
|
|
8
|
-
draggable: !0,
|
|
9
|
-
addOptions() {
|
|
10
|
-
return {
|
|
11
|
-
allowFullscreen: !0,
|
|
12
|
-
HTMLAttributes: { class: 'iframe-wrapper' },
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
addAttributes() {
|
|
16
|
-
return {
|
|
17
|
-
src: { default: null },
|
|
18
|
-
frameborder: { default: 0 },
|
|
19
|
-
allowfullscreen: {
|
|
20
|
-
default: this.options.allowFullscreen,
|
|
21
|
-
parseHTML: () => this.options.allowFullscreen,
|
|
22
|
-
},
|
|
23
|
-
width: {
|
|
24
|
-
renderHTML: (attributes) =>
|
|
25
|
-
attributes.width
|
|
26
|
-
? {
|
|
27
|
-
width:
|
|
28
|
-
attributes.width === '100%'
|
|
29
|
-
? '100%'
|
|
30
|
-
: parseInt(attributes.width),
|
|
31
|
-
}
|
|
32
|
-
: {},
|
|
33
|
-
parseHTML: (element) => element.getAttribute('width'),
|
|
34
|
-
},
|
|
35
|
-
height: {
|
|
36
|
-
renderHTML: (attributes) =>
|
|
37
|
-
attributes.height ? { height: parseInt(attributes.height) } : {},
|
|
38
|
-
parseHTML: (element) => element.getAttribute('height'),
|
|
39
|
-
},
|
|
40
|
-
style: {
|
|
41
|
-
renderHTML: (attributes) =>
|
|
42
|
-
attributes.style ? { style: attributes.style } : {},
|
|
43
|
-
parseHTML: (element) => element.getAttribute('style'),
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
parseHTML() {
|
|
48
|
-
return [{ tag: 'iframe' }];
|
|
49
|
-
},
|
|
50
|
-
renderHTML({ HTMLAttributes }) {
|
|
51
|
-
return ['div', this.options.HTMLAttributes, ['iframe', HTMLAttributes]];
|
|
52
|
-
},
|
|
53
|
-
addCommands() {
|
|
54
|
-
return {
|
|
55
|
-
setIframe:
|
|
56
|
-
(options) =>
|
|
57
|
-
({ tr, dispatch }) => {
|
|
58
|
-
const { selection } = tr,
|
|
59
|
-
node = this.type.create(options);
|
|
60
|
-
return (
|
|
61
|
-
dispatch &&
|
|
62
|
-
tr.replaceRangeWith(selection.from, selection.to, node),
|
|
63
|
-
!0
|
|
64
|
-
);
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
exports.Iframe = Iframe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const core=require("@tiptap/core"),Iframe=core.Node.create({name:"iframe",group:"block",atom:!0,draggable:!0,addOptions(){return{allowFullscreen:!0,HTMLAttributes:{class:"iframe-wrapper"}}},addAttributes(){return{src:{default:null},frameborder:{default:0},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen},width:{renderHTML:attributes=>attributes.width?{width:attributes.width==="100%"?"100%":parseInt(attributes.width)}:{},parseHTML:element=>element.getAttribute("width")},height:{renderHTML:attributes=>attributes.height?{height:parseInt(attributes.height)}:{},parseHTML:element=>element.getAttribute("height")},style:{renderHTML:attributes=>attributes.style?{style:attributes.style}:{},parseHTML:element=>element.getAttribute("style")}}},parseHTML(){return[{tag:"iframe"}]},renderHTML({HTMLAttributes}){return["div",this.options.HTMLAttributes,["iframe",HTMLAttributes]]},addCommands(){return{setIframe:options=>({tr,dispatch})=>{const{selection}=tr,node=this.type.create(options);return dispatch&&tr.replaceRangeWith(selection.from,selection.to,node),!0}}}});exports.Iframe=Iframe;
|
|
70
2
|
//# sourceMappingURL=iframe.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iframe.cjs","sources":["../../src/iframe/iframe.ts"],"sourcesContent":["import { Node } from
|
|
1
|
+
{"version":3,"file":"iframe.cjs","sources":["../../src/iframe/iframe.ts"],"sourcesContent":["import { Node } from \"@tiptap/core\";\n\nexport interface IframeOptions {\n allowFullscreen: boolean;\n HTMLAttributes: {\n [key: string]: any;\n };\n}\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n iframe: {\n /**\n * Add an iframe\n */\n setIframe: (options: { src: string }) => ReturnType;\n };\n }\n}\n\nexport const Iframe = Node.create<IframeOptions>({\n name: \"iframe\",\n group: \"block\",\n atom: true,\n draggable: true,\n\n addOptions() {\n return {\n allowFullscreen: true,\n HTMLAttributes: {\n class: \"iframe-wrapper\",\n },\n };\n },\n\n addAttributes() {\n return {\n src: {\n default: null,\n },\n frameborder: {\n default: 0,\n },\n allowfullscreen: {\n default: this.options.allowFullscreen,\n parseHTML: () => this.options.allowFullscreen,\n },\n width: {\n renderHTML: (attributes) => {\n return attributes.width\n ? {\n width:\n attributes.width === \"100%\"\n ? \"100%\"\n : parseInt(attributes.width),\n }\n : {};\n },\n parseHTML: (element) => element.getAttribute(\"width\"),\n },\n height: {\n renderHTML: (attributes) => {\n return attributes.height\n ? {\n height: parseInt(attributes.height),\n }\n : {};\n },\n parseHTML: (element) => element.getAttribute(\"height\"),\n },\n style: {\n renderHTML: (attributes) => {\n return attributes.style\n ? {\n style: attributes.style,\n }\n : {};\n },\n parseHTML: (element) => element.getAttribute(\"style\"),\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"iframe\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", this.options.HTMLAttributes, [\"iframe\", HTMLAttributes]];\n },\n\n addCommands() {\n return {\n setIframe:\n (options: { src: string }) =>\n ({ tr, dispatch }) => {\n const { selection } = tr;\n const node = this.type.create(options);\n\n if (dispatch) {\n tr.replaceRangeWith(selection.from, selection.to, node);\n }\n\n return true;\n },\n };\n },\n});\n"],"names":["Node"],"mappings":"mHAoBa,OAASA,UAAK,OAAsB,CAC/C,KAAM,SACN,MAAO,QACP,KAAM,GACN,UAAW,GAEX,YAAa,CACJ,MAAA,CACL,gBAAiB,GACjB,eAAgB,CACd,MAAO,gBAAA,CAEX,CACF,EAEA,eAAgB,CACP,MAAA,CACL,IAAK,CACH,QAAS,IACX,EACA,YAAa,CACX,QAAS,CACX,EACA,gBAAiB,CACf,QAAS,KAAK,QAAQ,gBACtB,UAAW,IAAM,KAAK,QAAQ,eAChC,EACA,MAAO,CACL,WAAa,YACJ,WAAW,MACd,CACE,MACE,WAAW,QAAU,OACjB,OACA,SAAS,WAAW,KAAK,CAAA,EAEjC,CAAC,EAEP,UAAY,SAAY,QAAQ,aAAa,OAAO,CACtD,EACA,OAAQ,CACN,WAAa,YACJ,WAAW,OACd,CACE,OAAQ,SAAS,WAAW,MAAM,CAAA,EAEpC,CAAC,EAEP,UAAY,SAAY,QAAQ,aAAa,QAAQ,CACvD,EACA,MAAO,CACL,WAAa,YACJ,WAAW,MACd,CACE,MAAO,WAAW,KAAA,EAEpB,CAAC,EAEP,UAAY,SAAY,QAAQ,aAAa,OAAO,CAAA,CAExD,CACF,EAEA,WAAY,CACH,MAAA,CACL,CACE,IAAK,QAAA,CAET,CACF,EAEA,WAAW,CAAE,gBAAkB,CACtB,MAAA,CAAC,MAAO,KAAK,QAAQ,eAAgB,CAAC,SAAU,cAAc,CAAC,CACxE,EAEA,aAAc,CACL,MAAA,CACL,UACG,SACD,CAAC,CAAE,GAAI,YAAe,CACd,KAAA,CAAE,WAAc,GAChB,KAAO,KAAK,KAAK,OAAO,OAAO,EAErC,OAAI,UACF,GAAG,iBAAiB,UAAU,KAAM,UAAU,GAAI,IAAI,EAGjD,EAAA,CAEb,CAAA,CAEJ,CAAC"}
|
package/dist/iframe/iframe.d.ts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { Node } from '@tiptap/core';
|
|
2
2
|
export interface IframeOptions {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
declare module '@tiptap/core' {
|
|
9
|
-
interface Commands<ReturnType> {
|
|
10
|
-
iframe: {
|
|
11
|
-
/**
|
|
12
|
-
* Add an iframe
|
|
13
|
-
*/
|
|
14
|
-
setIframe: (options: { src: string }) => ReturnType;
|
|
3
|
+
allowFullscreen: boolean;
|
|
4
|
+
HTMLAttributes: {
|
|
5
|
+
[key: string]: any;
|
|
15
6
|
};
|
|
16
|
-
|
|
7
|
+
}
|
|
8
|
+
declare module "@tiptap/core" {
|
|
9
|
+
interface Commands<ReturnType> {
|
|
10
|
+
iframe: {
|
|
11
|
+
/**
|
|
12
|
+
* Add an iframe
|
|
13
|
+
*/
|
|
14
|
+
setIframe: (options: {
|
|
15
|
+
src: string;
|
|
16
|
+
}) => ReturnType;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
17
19
|
}
|
|
18
20
|
export declare const Iframe: Node<IframeOptions, any>;
|