@tiptap/extension-paragraph 2.0.0-beta.20 → 2.0.0-beta.21
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/package.json +2 -2
- package/dist/packages/extension-paragraph/src/index.d.ts +0 -3
- package/dist/packages/extension-paragraph/src/paragraph.d.ts +0 -15
- package/dist/tiptap-extension-paragraph.cjs.js +0 -41
- package/dist/tiptap-extension-paragraph.cjs.js.map +0 -1
- package/dist/tiptap-extension-paragraph.esm.js +0 -36
- package/dist/tiptap-extension-paragraph.esm.js.map +0 -1
- package/dist/tiptap-extension-paragraph.umd.js +0 -45
- package/dist/tiptap-extension-paragraph.umd.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiptap/extension-paragraph",
|
|
3
3
|
"description": "paragraph extension for tiptap",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.21",
|
|
5
5
|
"homepage": "https://tiptap.dev",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tiptap",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"url": "https://github.com/ueberdosis/tiptap",
|
|
29
29
|
"directory": "packages/extension-paragraph"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "fce16e805824972834d5a8ce8d60e3ff41d63c7e"
|
|
32
32
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Node } from '@tiptap/core';
|
|
2
|
-
export interface ParagraphOptions {
|
|
3
|
-
HTMLAttributes: Record<string, any>;
|
|
4
|
-
}
|
|
5
|
-
declare module '@tiptap/core' {
|
|
6
|
-
interface Commands<ReturnType> {
|
|
7
|
-
paragraph: {
|
|
8
|
-
/**
|
|
9
|
-
* Toggle a paragraph
|
|
10
|
-
*/
|
|
11
|
-
setParagraph: () => ReturnType;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export declare const Paragraph: Node<ParagraphOptions, any>;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var core = require('@tiptap/core');
|
|
6
|
-
|
|
7
|
-
const Paragraph = core.Node.create({
|
|
8
|
-
name: 'paragraph',
|
|
9
|
-
priority: 1000,
|
|
10
|
-
addOptions() {
|
|
11
|
-
return {
|
|
12
|
-
HTMLAttributes: {},
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
group: 'block',
|
|
16
|
-
content: 'inline*',
|
|
17
|
-
parseHTML() {
|
|
18
|
-
return [
|
|
19
|
-
{ tag: 'p' },
|
|
20
|
-
];
|
|
21
|
-
},
|
|
22
|
-
renderHTML({ HTMLAttributes }) {
|
|
23
|
-
return ['p', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
24
|
-
},
|
|
25
|
-
addCommands() {
|
|
26
|
-
return {
|
|
27
|
-
setParagraph: () => ({ commands }) => {
|
|
28
|
-
return commands.setNode('paragraph');
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
addKeyboardShortcuts() {
|
|
33
|
-
return {
|
|
34
|
-
'Mod-Alt-0': () => this.editor.commands.setParagraph(),
|
|
35
|
-
};
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
exports.Paragraph = Paragraph;
|
|
40
|
-
exports["default"] = Paragraph;
|
|
41
|
-
//# sourceMappingURL=tiptap-extension-paragraph.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tiptap-extension-paragraph.cjs.js","sources":["../src/paragraph.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core'\n\nexport interface ParagraphOptions {\n HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n paragraph: {\n /**\n * Toggle a paragraph\n */\n setParagraph: () => ReturnType,\n }\n }\n}\n\nexport const Paragraph = Node.create<ParagraphOptions>({\n name: 'paragraph',\n\n priority: 1000,\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n group: 'block',\n\n content: 'inline*',\n\n parseHTML() {\n return [\n { tag: 'p' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['p', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n addCommands() {\n return {\n setParagraph: () => ({ commands }) => {\n return commands.setNode('paragraph')\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Alt-0': () => this.editor.commands.setParagraph(),\n }\n },\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;MAiBa,SAAS,GAAGA,SAAI,CAAC,MAAM,CAAmB;IACrD,IAAI,EAAE,WAAW;IAEjB,QAAQ,EAAE,IAAI;IAEd,UAAU;QACR,OAAO;YACL,cAAc,EAAE,EAAE;SACnB,CAAA;KACF;IAED,KAAK,EAAE,OAAO;IAEd,OAAO,EAAE,SAAS;IAElB,SAAS;QACP,OAAO;YACL,EAAE,GAAG,EAAE,GAAG,EAAE;SACb,CAAA;KACF;IAED,UAAU,CAAC,EAAE,cAAc,EAAE;QAC3B,OAAO,CAAC,GAAG,EAAEC,oBAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAA;KAC9E;IAED,WAAW;QACT,OAAO;YACL,YAAY,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE;gBAC/B,OAAO,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;aACrC;SACF,CAAA;KACF;IAED,oBAAoB;QAClB,OAAO;YACL,WAAW,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE;SACvD,CAAA;KACF;CACF;;;;;"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Node, mergeAttributes } from '@tiptap/core';
|
|
2
|
-
|
|
3
|
-
const Paragraph = Node.create({
|
|
4
|
-
name: 'paragraph',
|
|
5
|
-
priority: 1000,
|
|
6
|
-
addOptions() {
|
|
7
|
-
return {
|
|
8
|
-
HTMLAttributes: {},
|
|
9
|
-
};
|
|
10
|
-
},
|
|
11
|
-
group: 'block',
|
|
12
|
-
content: 'inline*',
|
|
13
|
-
parseHTML() {
|
|
14
|
-
return [
|
|
15
|
-
{ tag: 'p' },
|
|
16
|
-
];
|
|
17
|
-
},
|
|
18
|
-
renderHTML({ HTMLAttributes }) {
|
|
19
|
-
return ['p', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
20
|
-
},
|
|
21
|
-
addCommands() {
|
|
22
|
-
return {
|
|
23
|
-
setParagraph: () => ({ commands }) => {
|
|
24
|
-
return commands.setNode('paragraph');
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
},
|
|
28
|
-
addKeyboardShortcuts() {
|
|
29
|
-
return {
|
|
30
|
-
'Mod-Alt-0': () => this.editor.commands.setParagraph(),
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
export { Paragraph, Paragraph as default };
|
|
36
|
-
//# sourceMappingURL=tiptap-extension-paragraph.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tiptap-extension-paragraph.esm.js","sources":["../src/paragraph.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core'\n\nexport interface ParagraphOptions {\n HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n paragraph: {\n /**\n * Toggle a paragraph\n */\n setParagraph: () => ReturnType,\n }\n }\n}\n\nexport const Paragraph = Node.create<ParagraphOptions>({\n name: 'paragraph',\n\n priority: 1000,\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n group: 'block',\n\n content: 'inline*',\n\n parseHTML() {\n return [\n { tag: 'p' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['p', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n addCommands() {\n return {\n setParagraph: () => ({ commands }) => {\n return commands.setNode('paragraph')\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Alt-0': () => this.editor.commands.setParagraph(),\n }\n },\n})\n"],"names":[],"mappings":";;MAiBa,SAAS,GAAG,IAAI,CAAC,MAAM,CAAmB;IACrD,IAAI,EAAE,WAAW;IAEjB,QAAQ,EAAE,IAAI;IAEd,UAAU;QACR,OAAO;YACL,cAAc,EAAE,EAAE;SACnB,CAAA;KACF;IAED,KAAK,EAAE,OAAO;IAEd,OAAO,EAAE,SAAS;IAElB,SAAS;QACP,OAAO;YACL,EAAE,GAAG,EAAE,GAAG,EAAE;SACb,CAAA;KACF;IAED,UAAU,CAAC,EAAE,cAAc,EAAE;QAC3B,OAAO,CAAC,GAAG,EAAE,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAA;KAC9E;IAED,WAAW;QACT,OAAO;YACL,YAAY,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE;gBAC/B,OAAO,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;aACrC;SACF,CAAA;KACF;IAED,oBAAoB;QAClB,OAAO;YACL,WAAW,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE;SACvD,CAAA;KACF;CACF;;;;"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tiptap/core')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@tiptap/core'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@tiptap/extension-paragraph"] = {}, global.core));
|
|
5
|
-
})(this, (function (exports, core) { 'use strict';
|
|
6
|
-
|
|
7
|
-
const Paragraph = core.Node.create({
|
|
8
|
-
name: 'paragraph',
|
|
9
|
-
priority: 1000,
|
|
10
|
-
addOptions() {
|
|
11
|
-
return {
|
|
12
|
-
HTMLAttributes: {},
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
group: 'block',
|
|
16
|
-
content: 'inline*',
|
|
17
|
-
parseHTML() {
|
|
18
|
-
return [
|
|
19
|
-
{ tag: 'p' },
|
|
20
|
-
];
|
|
21
|
-
},
|
|
22
|
-
renderHTML({ HTMLAttributes }) {
|
|
23
|
-
return ['p', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
24
|
-
},
|
|
25
|
-
addCommands() {
|
|
26
|
-
return {
|
|
27
|
-
setParagraph: () => ({ commands }) => {
|
|
28
|
-
return commands.setNode('paragraph');
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
addKeyboardShortcuts() {
|
|
33
|
-
return {
|
|
34
|
-
'Mod-Alt-0': () => this.editor.commands.setParagraph(),
|
|
35
|
-
};
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
exports.Paragraph = Paragraph;
|
|
40
|
-
exports["default"] = Paragraph;
|
|
41
|
-
|
|
42
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
43
|
-
|
|
44
|
-
}));
|
|
45
|
-
//# sourceMappingURL=tiptap-extension-paragraph.umd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tiptap-extension-paragraph.umd.js","sources":["../src/paragraph.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core'\n\nexport interface ParagraphOptions {\n HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n paragraph: {\n /**\n * Toggle a paragraph\n */\n setParagraph: () => ReturnType,\n }\n }\n}\n\nexport const Paragraph = Node.create<ParagraphOptions>({\n name: 'paragraph',\n\n priority: 1000,\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n group: 'block',\n\n content: 'inline*',\n\n parseHTML() {\n return [\n { tag: 'p' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['p', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n addCommands() {\n return {\n setParagraph: () => ({ commands }) => {\n return commands.setNode('paragraph')\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Alt-0': () => this.editor.commands.setParagraph(),\n }\n },\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;QAiBa,SAAS,GAAGA,SAAI,CAAC,MAAM,CAAmB;MACrD,IAAI,EAAE,WAAW;MAEjB,QAAQ,EAAE,IAAI;MAEd,UAAU;UACR,OAAO;cACL,cAAc,EAAE,EAAE;WACnB,CAAA;OACF;MAED,KAAK,EAAE,OAAO;MAEd,OAAO,EAAE,SAAS;MAElB,SAAS;UACP,OAAO;cACL,EAAE,GAAG,EAAE,GAAG,EAAE;WACb,CAAA;OACF;MAED,UAAU,CAAC,EAAE,cAAc,EAAE;UAC3B,OAAO,CAAC,GAAG,EAAEC,oBAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAA;OAC9E;MAED,WAAW;UACT,OAAO;cACL,YAAY,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE;kBAC/B,OAAO,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;eACrC;WACF,CAAA;OACF;MAED,oBAAoB;UAClB,OAAO;cACL,WAAW,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE;WACvD,CAAA;OACF;GACF;;;;;;;;;;;"}
|