@yiitap/vue 1.0.0
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/LICENSE +21 -0
- package/README.md +11 -0
- package/dist/index.cjs +125 -0
- package/dist/index.js +125 -0
- package/dist/index.mjs +44015 -0
- package/dist/vue.css +1 -0
- package/package.json +97 -0
- package/types/components/YiiEditor.vue.d.ts +203 -0
- package/types/components/buttons/OAlignDropdown.vue.d.ts +10 -0
- package/types/components/buttons/OAlignGroup.vue.d.ts +11 -0
- package/types/components/buttons/OBackColorDropdown.vue.d.ts +10 -0
- package/types/components/buttons/OFontFamilyDropdown.vue.d.ts +10 -0
- package/types/components/buttons/OForeColorDropdown.vue.d.ts +10 -0
- package/types/components/buttons/OHeadingDropdown.vue.d.ts +10 -0
- package/types/components/buttons/OLinkBtn.vue.d.ts +13 -0
- package/types/components/buttons/OLinkEditBtn.vue.d.ts +13 -0
- package/types/components/buttons/OLinkOpenBtn.vue.d.ts +10 -0
- package/types/components/buttons/OListDropdown.vue.d.ts +10 -0
- package/types/components/buttons/OListGroup.vue.d.ts +13 -0
- package/types/components/buttons/OMoreBubble.vue.d.ts +13 -0
- package/types/components/buttons/OSimpleCommandBtn.vue.d.ts +20 -0
- package/types/components/buttons/OStyleDropdown.vue.d.ts +10 -0
- package/types/components/buttons/OTableBtn.vue.d.ts +10 -0
- package/types/components/buttons/OTableGroup.vue.d.ts +13 -0
- package/types/components/buttons/OTextColorDropdown.vue.d.ts +13 -0
- package/types/components/buttons/OTextFormatDropdown.vue.d.ts +13 -0
- package/types/components/common/OBlockPlaceholder.vue.d.ts +23 -0
- package/types/components/common/OBlockPopover.vue.d.ts +75 -0
- package/types/components/common/OCalloutColorBoard.vue.d.ts +36 -0
- package/types/components/common/OCalloutColorDropdown.vue.d.ts +14 -0
- package/types/components/common/OColorBoard.vue.d.ts +36 -0
- package/types/components/common/OCommandBtn.vue.d.ts +97 -0
- package/types/components/common/OCommonBtn.vue.d.ts +97 -0
- package/types/components/common/OContextMenu.vue.d.ts +52 -0
- package/types/components/common/OLanguageDropdown.vue.d.ts +18 -0
- package/types/components/common/OMediaInput.vue.d.ts +27 -0
- package/types/components/common/OMenubarBtn.vue.d.ts +81 -0
- package/types/components/common/OMetaInput.vue.d.ts +72 -0
- package/types/components/common/OTableCellBackground.vue.d.ts +10 -0
- package/types/components/common/OTableGrid.vue.d.ts +6 -0
- package/types/components/common/OTextColorBoard.vue.d.ts +36 -0
- package/types/components/common/o-side-menu/DragNodeMenu.vue.d.ts +64 -0
- package/types/components/index.d.ts +30 -0
- package/types/components/menu.d.ts +1 -0
- package/types/components/menus/OBubbleMenu.vue.d.ts +38 -0
- package/types/components/menus/OFloatingMenu.vue.d.ts +38 -0
- package/types/components/menus/OMainMenu.vue.d.ts +28 -0
- package/types/components/menus/OSideMenu.vue.d.ts +23 -0
- package/types/components/menus/side-menu/index.d.ts +2 -0
- package/types/components/ui/OBtn.vue.d.ts +43 -0
- package/types/components/ui/OCheckbox.vue.d.ts +27 -0
- package/types/components/ui/ODivider.vue.d.ts +14 -0
- package/types/components/ui/OIcon.vue.d.ts +32 -0
- package/types/components/ui/OInput.vue.d.ts +51 -0
- package/types/components/ui/OList.vue.d.ts +30 -0
- package/types/components/ui/OListItem.vue.d.ts +23 -0
- package/types/components/ui/OPopover.vue.d.ts +86 -0
- package/types/components/ui/OTooltip.d.ts +16 -0
- package/types/components/ui/OTooltip.vue.d.ts +32 -0
- package/types/constants/block.d.ts +5 -0
- package/types/constants/color.d.ts +5 -0
- package/types/constants/demo-article.d.ts +7 -0
- package/types/constants/empty-block.d.ts +21 -0
- package/types/constants/language.d.ts +1 -0
- package/types/constants/menu.d.ts +31 -0
- package/types/extensions/blockquote/index.d.ts +3 -0
- package/types/extensions/callout/index.d.ts +21 -0
- package/types/extensions/code-block/index.d.ts +3 -0
- package/types/extensions/color-highlighter/index.d.ts +3 -0
- package/types/extensions/color-highlighter/utils.d.ts +3 -0
- package/types/extensions/dynamic.d.ts +11 -0
- package/types/extensions/focus/index.d.ts +10 -0
- package/types/extensions/heading/index.d.ts +7 -0
- package/types/extensions/horizontal-rule/index.d.ts +2 -0
- package/types/extensions/image/index.d.ts +3 -0
- package/types/extensions/index.d.ts +22 -0
- package/types/extensions/link/helpers/clickSelectHandler.d.ts +2 -0
- package/types/extensions/link/index.d.ts +3 -0
- package/types/extensions/paragraph/index.d.ts +2 -0
- package/types/extensions/placeholder/index.d.ts +17 -0
- package/types/extensions/side-menu/index.d.ts +2 -0
- package/types/extensions/side-menu/side-menu-plugin.d.ts +72 -0
- package/types/extensions/side-menu/utils.d.ts +50 -0
- package/types/extensions/slash/index.d.ts +3 -0
- package/types/extensions/slash/slash-zh.d.ts +3 -0
- package/types/extensions/slash/slash.d.ts +6 -0
- package/types/extensions/slash/suggestion.d.ts +18 -0
- package/types/extensions/slash/view.new.vue.d.ts +36 -0
- package/types/extensions/slash/view.vue.d.ts +54 -0
- package/types/extensions/table/TableView.d.ts +18 -0
- package/types/extensions/table/index.d.ts +11 -0
- package/types/extensions/table-cell/index.d.ts +3 -0
- package/types/extensions/table-header/index.d.ts +3 -0
- package/types/extensions/table-wrapper/index.d.ts +3 -0
- package/types/extensions/trailing-node/index.d.ts +3 -0
- package/types/extensions/unique-id/index.d.ts +2 -0
- package/types/extensions/unique-id/unique-id.d.ts +2 -0
- package/types/extensions/unique-id-simple/index.d.ts +8 -0
- package/types/extensions/video/index.d.ts +11 -0
- package/types/hooks/index.d.ts +3 -0
- package/types/hooks/useI18n.d.ts +7 -0
- package/types/hooks/useTheme.d.ts +6 -0
- package/types/hooks/useTiptap.d.ts +5 -0
- package/types/i18n/index.d.ts +4 -0
- package/types/i18n/messages/en.d.ts +185 -0
- package/types/i18n/messages/pl.d.ts +182 -0
- package/types/i18n/messages/pt-br.d.ts +182 -0
- package/types/i18n/messages/zh-hans.d.ts +185 -0
- package/types/i18n/messages/zh-hant.d.ts +182 -0
- package/types/index.d.ts +10 -0
- package/types/utils/copy-to-clipboard.d.ts +1 -0
- package/types/utils/uuid.d.ts +1 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import 'tippy.js/animations/perspective.css';
|
|
2
|
+
export declare const OTooltip: import("vue").DefineComponent<{
|
|
3
|
+
placement: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
placement: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
}>>, {
|
|
15
|
+
placement: string;
|
|
16
|
+
}, {}>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import 'tippy.js/animations/perspective.css';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
3
|
+
placement: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
trigger: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
placement: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
trigger: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
}>>, {
|
|
21
|
+
placement: string;
|
|
22
|
+
trigger: string;
|
|
23
|
+
}, {}>, {
|
|
24
|
+
trigger?(_: {}): any;
|
|
25
|
+
default?(_: {}): any;
|
|
26
|
+
}>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Demo: Article
|
|
3
|
+
*/
|
|
4
|
+
export declare const BasicFeaturesArticle = "\n<h1 id=\"heading-1\">Introduction</h1><p><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://github.com/donotebase/quasar-tiptap\"><span style=\"color: rgb(24, 144, 255)\"><strong>YiitapEditor</strong></span></a><span style=\"color: rgb(24, 144, 255)\"><strong><em> </em></strong></span>is a WYSIWYG rich-text block-based editor built on top of <span style=\"font-family: Arial Black\">tiptap</span> and Quasar.\uD83D\uDD25</p><h2 id=\"heading-2\">Callout</h2><div icon=\"\uD83C\uDF3E\" data-type=\"callout\"><p><strong>Announcement</strong></p><p>Make writing stand out.</p></div><h2 id=\"heading-3\">Blockquote</h2><blockquote><p><span style=\"font-family: Roboto, -apple-system, Helvetica Neue, Helvetica, Arial, sans-serif; color: rgb(0, 0, 0)\">A gentleman should constantly strike to become stronger just like the evolution of the universe.</span><br><span style=\"font-family: Roboto, -apple-system, Helvetica Neue, Helvetica, Arial, sans-serif; color: rgb(0, 0, 0)\">A gentleman should generously cultivate to become tolerant just like the earth bears everything on it.</span></p></blockquote><h2 id=\"heading-4\">Table</h2><table-wrapper><table><tbody><tr><th colspan=\"1\" rowspan=\"1\" background=\"\"><p style=\"text-align: center\">Th1</p></th><th colspan=\"1\" rowspan=\"1\" background=\"\"><p style=\"text-align: center\">Th2</p></th><th colspan=\"1\" rowspan=\"1\" background=\"\"><p style=\"text-align: center\">Th3</p></th><th colspan=\"1\" rowspan=\"1\" background=\"\"><p>Th3</p></th></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>List</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><ul data-type=\"taskList\"><li data-checked=\"false\" data-type=\"taskItem\"><label><input type=\"checkbox\"><span></span></label><div><p>Task 1</p></div></li><li data-checked=\"false\" data-type=\"taskItem\"><label><input type=\"checkbox\"><span></span></label><div><p>Task 2</p></div></li></ul></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><ul><li><p>List item 1</p></li><li><p>List item 2</p></li></ul></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><ol><li><p>Number one</p></li><li><p>Number two</p></li></ol></td></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Text</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Text</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Text</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Text</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"#1890ff\"><p><span style=\"color: #ffffff\">Cell Background</span></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p></p></td><td colspan=\"2\" rowspan=\"1\" background=\"\"><p>Merged Cell</p></td></tr></tbody></table></table-wrapper><h2 id=\"heading-5\">Image</h2><blockquote><p>A picture is worth a thousand of words.</p></blockquote><img src=\"https://www.donote.info/statics/logo.png\" alt=\"Caption\" title=\"Title\" size=\"large\" ratio=\"5/1\"><h2 id=\"heading-6\">Video</h2><video><source src=\"https://dhweb-app.oss-cn-hangzhou.aliyuncs.com/video/An-225.mp4\"></source></video><h2 id=\"heading-7\">Model View</h2><model-viewer src=\"https://dhweb-app.oss-cn-hangzhou.aliyuncs.com/models/NeilArmstrong.glb\"></model-viewer><h2 id=\"heading-8\">List</h2><h3 id=\"heading-9\">Unordered List</h3><ul><li><p>List Item 1</p><ul><li><p>List Item 1.1</p></li><li><p>List Item 1.21</p></li></ul></li><li><p>List Item 2</p></li><li><p>List Item 3</p></li></ul><h3 id=\"heading-10\">Ordered List</h3><blockquote><p>PDCA</p></blockquote><ol><li><p>Plan</p><ol><li><p>Plan 1</p></li><li><p>Plan 2</p></li></ol></li><li><p>Do</p></li><li><p>Check</p></li><li><p>Adust</p></li></ol><h3 id=\"heading-11\">Task</h3><ul data-type=\"taskList\"><li data-checked=\"true\" data-type=\"taskItem\"><label><input type=\"checkbox\" checked=\"checked\"><span></span></label><div><p>Model Viewer</p></div></li><li data-checked=\"false\" data-type=\"taskItem\"><label><input type=\"checkbox\"><span></span></label><div><p>Diagram</p></div></li><li data-checked=\"false\" data-type=\"taskItem\"><label><input type=\"checkbox\"><span></span></label><div><p>Math Formula</p></div></li><li data-checked=\"false\" data-type=\"taskItem\"><label><input type=\"checkbox\"><span></span></label><div><p>Draggable handler for all blocks</p></div></li></ul><h2 id=\"heading-12\">Diagram</h2><p></p><pre><code class=\"language-bash\">ls ll</code></pre><p></p><div data-type=\"draggable-item\"><p>Draggable</p></div><h2 id=\"heading-13\">Math</h2><blockquote><p><span style=\"font-family: Roboto, -apple-system, Helvetica Neue, Helvetica, Arial, sans-serif\">Write inline formula, such as </span>\uFF0Cor block formula:</p></blockquote><p></p><p></p><h2 id=\"heading-14\">Code Block</h2><blockquote><p>Friendly to developer, with syntax highlight.</p></blockquote><h3 id=\"heading-15\">Bash</h3><pre><code class=\"language-javascript\">const name = 'JavaScript';\nconsole.log('Hello, world', name);</code></pre><h3 id=\"heading-16\">Go</h3><pre><code class=\"language-go\">package main\n\nimport \"fmt\"\n\nfunc main() {\n fmt.Println(\"Hello, world!\")\n}</code></pre><h2 id=\"heading-17\">Markdown</h2><table-wrapper><table><tbody><tr><th colspan=\"1\" rowspan=\"1\" colwidth=\"290\" background=\"\"><p style=\"text-align: center\">Title</p></th><th colspan=\"1\" rowspan=\"1\" background=\"\"><p style=\"text-align: center\">Shortcut</p></th><th colspan=\"1\" rowspan=\"1\" background=\"\"><p style=\"text-align: center\">Remarks</p></th></tr><tr><td colspan=\"1\" rowspan=\"1\" colwidth=\"290\" background=\"\"><p>Heading</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>#</code> <code>##</code> <code>###</code> <code>####</code> <code>#####</code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p></p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" colwidth=\"290\" background=\"\"><p>Blockquote</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>></code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p></p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" colwidth=\"290\" background=\"\"><p>Code</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>``</code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p></p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" colwidth=\"290\" background=\"\"><p>Code Block</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>```</code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p></p></td></tr></tbody></table></table-wrapper><h2 id=\"heading-18\">Typography</h2><h3 id=\"heading-19\">Heading 3</h3><p>abcde</p><h4 id=\"heading-20\">Heading 4</h4><p>aaa</p><h3 id=\"heading-21\">Paragraph</h3><p>Youth is not a time of life; it is a state of mind; it is not a matter of rosy cheeks, red lips and supple knees; it is a matter of the will, a quality of the imagination, a vigor of the emotions; it is the freshness of the deep springs of life.</p><p style=\"text-align: start\">Youth means a temperamental predominance of courage over timidity, of the appetite for adventure over the love of ease. This often exists in a man of 60 more than a boy of 20. Nobody grows old merely by a number of years. We grow old by deserting our ideals.</p><p style=\"text-align: start\">Years may wrinkle the skin, but to give up enthusiasm wrinkles the soul. Worry, fear, self-distrust bows the heart and turns the spirit back to dust.</p><p style=\"text-align: start\">Whether 60 or 16, there is in every human being\u2019s heart the lure of wonder, the unfailing childlike appetite of what\u2019s next and the joy of the game of living. In the center of your heart and my heart there is a wireless station: so long as it receives messages of beauty, hope, cheer, courage and power from men and from the Infinite, so long are you young.</p><p style=\"text-align: start\">When the aerials are down, and your spirit is covered with snows of cynicism and the ice of pessimism, then you are grown old, even at 20, but as long as your aerials are up, to catch waves of optimism, there is hope you may die young at 80.</p><h3 id=\"heading-22\">Smart</h3><table-wrapper><table><tbody><tr><th colspan=\"1\" rowspan=\"1\" background=\"\"><p style=\"text-align: center\">Title</p></th><th colspan=\"1\" rowspan=\"1\" background=\"\"><p style=\"text-align: center\">Input</p></th><th colspan=\"1\" rowspan=\"1\" background=\"\"><p style=\"text-align: center\">Remarks</p></th></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Copyright</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>(c)</code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>\u00A9</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Right</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>(r)</code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>\u00AE</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Arrow</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>>></code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>\u00BB</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Arrow</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>-></code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>\u2192</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Not equal</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>!=</code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>\u2260</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>1/2</code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>\u00BD</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Dash</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>--</code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>\u2014</p></td></tr></tbody></table></table-wrapper><h2 id=\"heading-23\">Text</h2><p><span style=\"font-family: Arial Black\"><strong>Bold text</strong></span></p><p><em>Italic text</em></p><p><u>Underline text</u></p><p><s>Strike through text</s></p><p><code>Inline code</code></p><p><span style=\"color: rgb(255, 77, 79)\">Text with color</span></p><p>Text with highlight background</p><p>Text with indent</p><p></p>\n";
|
|
5
|
+
export declare const BasicFeaturesArticleZh = "\n<h1 id=\"heading-1\">Yiitap</h1><p><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://github.com/donotebase/quasar-tiptap\"><span style=\"color: rgb(24, 144, 255)\"><strong>YiitapEditor</strong></span></a><span style=\"color: rgb(24, 144, 255)\"><strong><em> </em></strong></span>is a WYSIWYG rich-text block-based editor built on top of <span style=\"font-family: Arial Black\">tiptap</span> and Quasar.\uD83D\uDD25</p><h2 id=\"heading-2\">\u9AD8\u4EAE\u5757</h2><div icon=\"\uD83C\uDF3E\" data-type=\"callout\"><p><strong>\u901A\u77E5</strong></p><p>\u7740\u91CD\u5F3A\u8C03\u3002</p></div><h2 id=\"heading-3\">\u5F15\u7528</h2><blockquote><p>\u5929\u884C\u5065\uFF0C\u541B\u5B50\u4EE5\u81EA\u5F3A\u4E0D\u606F\uFF1B<br>\u5730\u52BF\u5764\uFF0C\u541B\u5B50\u4EE5\u539A\u5FB7\u8F7D\u7269\u3002</p></blockquote><h2 id=\"heading-4\">\u8868\u683C</h2><table-wrapper><table><tbody><tr><th colspan=\"1\" rowspan=\"1\" background=\"\"><p style=\"text-align: center\">Th1</p></th><th colspan=\"1\" rowspan=\"1\" background=\"\"><p style=\"text-align: center\">Th2</p></th><th colspan=\"1\" rowspan=\"1\" background=\"\"><p style=\"text-align: center\">Th3</p></th><th colspan=\"1\" rowspan=\"1\" background=\"\"><p>Th3</p></th></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>List</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><ul data-type=\"taskList\"><li data-checked=\"false\" data-type=\"taskItem\"><label><input type=\"checkbox\"><span></span></label><div><p>Task 1</p></div></li><li data-checked=\"false\" data-type=\"taskItem\"><label><input type=\"checkbox\"><span></span></label><div><p>Task 2</p></div></li></ul></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><ul><li><p>List item 1</p></li><li><p>List item 2</p></li></ul></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><ol><li><p>Number one</p></li><li><p>Number two</p></li></ol></td></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Text</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Text</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Text</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Text</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"#1890ff\"><p><span style=\"color: rgb(255, 255, 255)\">\u5355\u5143\u683C\u80CC\u666F</span></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p></p></td><td colspan=\"2\" rowspan=\"1\" background=\"\"><p>\u5408\u5E76\u5355\u5143\u683C</p></td></tr></tbody></table></table-wrapper><h2 id=\"heading-5\">\u56FE\u7247</h2><blockquote><p>\u4E00\u56FE\u80DC\u5343\u8A00\u3002</p></blockquote><p><img src=\"https://dhweb-app.oss-cn-hangzhou.aliyuncs.com/images/M42.jpg\" alt=\"Caption\" title=\"Title\" size=\"large\" ratio=\"5/1\"></p><h2 id=\"heading-6\">\u89C6\u9891</h2><video><source src=\"https://dhweb-app.oss-cn-hangzhou.aliyuncs.com/video/An-225.mp4\"></source></video><h2 id=\"heading-7\">3D\u6A21\u578B</h2><model-viewer src=\"https://dhweb-app.oss-cn-hangzhou.aliyuncs.com/models/NeilArmstrong.glb\"></model-viewer><h2 id=\"heading-8\">\u5217\u8868</h2><h3 id=\"heading-9\">\u65E0\u5E8F\u5217\u8868</h3><ul><li><p>List Item 1</p><ul><li><p>List Item 1.1</p></li><li><p>List Item 1.21</p></li></ul></li><li><p>List Item 2</p></li><li><p>List Item 3</p></li></ul><h3 id=\"heading-10\">\u6709\u5E8F\u5217\u8868</h3><blockquote><p>PDCA</p></blockquote><ol><li><p>Plan</p><ol><li><p>Plan 1</p></li><li><p>Plan 2</p></li></ol></li><li><p>Do</p></li><li><p>Check</p></li><li><p>Adust</p></li></ol><h3 id=\"heading-11\">\u4EFB\u52A1</h3><ul data-type=\"taskList\"><li data-checked=\"true\" data-type=\"taskItem\"><label><input type=\"checkbox\" checked=\"checked\"><span></span></label><div><p>Model Viewer</p></div></li><li data-checked=\"false\" data-type=\"taskItem\"><label><input type=\"checkbox\"><span></span></label><div><p>Diagram</p></div></li><li data-checked=\"false\" data-type=\"taskItem\"><label><input type=\"checkbox\"><span></span></label><div><p>Math Formula</p></div></li><li data-checked=\"false\" data-type=\"taskItem\"><label><input type=\"checkbox\"><span></span></label><div><p>Draggable handler for all blocks</p></div></li></ul><h2 id=\"heading-12\">\u56FE\u8868</h2><p></p><pre><code class=\"language-bash\">ls ll</code></pre><p></p><div data-type=\"draggable-item\"><p>Draggable</p></div><h2 id=\"heading-13\">\u6570\u5B66\u516C\u5F0F</h2><blockquote><p><span style=\"font-family: Roboto, -apple-system, Helvetica Neue, Helvetica, Arial, sans-serif\">Write inline formula, such as </span>\uFF0Cor block formula:</p></blockquote><p></p><p></p><h2 id=\"heading-14\">\u4EE3\u7801\u5757</h2><blockquote><p>Friendly to developer, with syntax highlight.</p></blockquote><h3 id=\"heading-15\">Bash</h3><pre><code class=\"language-javascript\">const name = 'JavaScript';\nconsole.log('Hello, world', name);</code></pre><h3 id=\"heading-16\">Go</h3><pre><code class=\"language-go\">package main\n\nimport \"fmt\"\n\nfunc main() {\n fmt.Println(\"Hello, world!\")\n}</code></pre><h2 id=\"heading-17\">Markdown</h2><table-wrapper><table><tbody><tr><th colspan=\"1\" rowspan=\"1\" colwidth=\"290\" background=\"\"><p style=\"text-align: center\">Title</p></th><th colspan=\"1\" rowspan=\"1\" background=\"\"><p style=\"text-align: center\">Shortcut</p></th><th colspan=\"1\" rowspan=\"1\" background=\"\"><p style=\"text-align: center\">Remarks</p></th></tr><tr><td colspan=\"1\" rowspan=\"1\" colwidth=\"290\" background=\"\"><p>Heading</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>#</code> <code>##</code> <code>###</code> <code>####</code> <code>#####</code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p></p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" colwidth=\"290\" background=\"\"><p>Blockquote</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>></code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p></p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" colwidth=\"290\" background=\"\"><p>Code</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>``</code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p></p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" colwidth=\"290\" background=\"\"><p>Code Block</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>```</code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p></p></td></tr></tbody></table></table-wrapper><h2 id=\"heading-18\">\u6392\u7248</h2><h3 id=\"heading-19\">\u6807\u9898 3</h3><p></p><h4 id=\"heading-20\">\u6807\u9898 4</h4><p>aaa</p><h3 id=\"heading-21\">\u6BB5\u843D</h3><p>\u9752\u6625\u4E0D\u662F\u5E74\u534E\uFF0C\u800C\u662F\u5FC3\u5883\uFF1B\u9752\u6625\u4E0D\u662F\u6843\u9762\u3001\u4E39\u5507\u3001\u67D4\u819D\uFF0C\u800C\u662F\u6DF1\u6C89\u7684\u610F\u5FD7\uFF0C\u6062\u5B8F\u7684\u60F3\u8C61\uFF0C\u7099\u70ED\u7684\u611F\u60C5\uFF1B\u9752\u6625\u662F\u751F\u547D\u7684\u6DF1\u6CC9\u5728\u6D8C\u6D41\u3002</p><p style=\"text-align: start\">\u9752\u6625\u6C14\u8D2F\u957F\u8679\uFF0C\u52C7\u9510\u76D6\u8FC7\u602F\u5F31\uFF0C\u8FDB\u53D6\u538B\u5012\u82DF\u5B89\u3002\u5982\u6B64\u9510\u6C14\uFF0C\u4E8C\u5341\u540E\u751F\u800C\u6709\u4E4B\uFF0C\u516D\u65EC\u7537\u5B50\u5219\u66F4\u591A\u89C1\u3002\u5E74\u5C81\u6709\u52A0\uFF0C\u5E76\u975E\u5782\u8001\uFF0C\u7406\u60F3\u4E22\u5F03\uFF0C\u65B9\u5815\u66AE\u5E74\u3002</p><p style=\"text-align: start\">\u5C81\u6708\u60A0\u60A0\uFF0C\u8870\u5FAE\u53EA\u53CA\u808C\u80A4\uFF1B\u70ED\u5FF1\u629B\u5374\uFF0C\u9893\u5E9F\u5FC5\u81F4\u7075\u9B42\u3002\u5FE7\u70E6\uFF0C\u60F6\u6050\uFF0C\u4E27\u5931\u81EA\u4FE1\uFF0C\u5B9A\u4F7F\u5FC3\u7075\u626D\u66F2\uFF0C\u610F\u6C14\u5982\u7070\u3002</p><p style=\"text-align: start\">\u65E0\u8BBA\u5E74\u5C4A\u82B1\u7532\uFF0C\u6291\u6216\u4E8C\u516B\u82B3\u9F84\uFF0C\u5FC3\u4E2D\u7686\u6709\u751F\u547D\u4E4B\u6B22\u4E50\uFF0C\u5947\u8FF9\u4E4B\u8BF1\u60D1\uFF0C\u5B69\u7AE5\u822C\u5929\u771F\u4E45\u76DB\u4E0D\u8870\u3002\u4EBA\u4EBA\u5FC3\u4E2D\u7686\u6709\u4E00\u53F0\u5929\u7EBF\uFF0C\u53EA\u8981\u4F60\u4ECE\u5929\u4E0A\u4EBA\u95F4\u63A5\u53D7\u7F8E\u597D\u3001\u5E0C\u671B\u3001\u6B22\u4E50\u3001\u52C7\u6C14\u548C\u529B\u91CF\u7684\u4FE1\u53F7\uFF0C\u4F60\u5C31\u9752\u6625\u6C38\u9A7B\uFF0C\u98CE\u534E\u5E38\u5B58\u3002</p><p style=\"text-align: start\">\u4E00\u65E6\u5929\u7EBF\u4E0B\u964D\uFF0C\u9510\u6C14\u4FBF\u88AB\u51B0\u96EA\u8986\u76D6\uFF0C\u73A9\u4E16\u4E0D\u606D\u3001\u81EA\u66B4\u81EA\u5F03\u6CB9\u7136\u800C\u751F\uFF0C\u5373\u4F7F\u5E74\u65B9\u4E8C\u5341\uFF0C\u5B9E\u5DF2\u5782\u5782\u8001\u77E3\uFF1B\u7136\u5219\u53EA\u8981\u6811\u8D77\u5929\u7EBF\uFF0C\u6355\u6349\u4E50\u89C2\u4FE1\u53F7\uFF0C\u4F60\u5C31\u6709\u671B\u5728\u516B\u5341\u9AD8\u9F84\u544A\u522B\u5C18\u5BF0\u65F6\u4ECD\u89C9\u5E74\u8F7B\u3002</p><h3 id=\"heading-22\">\u5FEB\u6377\u8F93\u5165</h3><table-wrapper><table><tbody><tr><th colspan=\"1\" rowspan=\"1\" background=\"\"><p style=\"text-align: center\">Title</p></th><th colspan=\"1\" rowspan=\"1\" background=\"\"><p style=\"text-align: center\">Input</p></th><th colspan=\"1\" rowspan=\"1\" background=\"\"><p style=\"text-align: center\">Remarks</p></th></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Copyright</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>(c)</code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>\u00A9</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Right</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>(r)</code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>\u00AE</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Arrow</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>>></code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>\u00BB</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Arrow</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>-></code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>\u2192</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Not equal</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>!=</code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>\u2260</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>1/2</code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>\u00BD</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>Dash</p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p><code>--</code></p></td><td colspan=\"1\" rowspan=\"1\" background=\"\"><p>\u2014</p></td></tr></tbody></table></table-wrapper><h2 id=\"heading-23\">\u6587\u672C</h2><p><span style=\"font-family: Arial Black\"><strong>Bold text</strong></span></p><p><em>Italic text</em></p><p><u>Underline text</u></p><p><s>Strike through text</s></p><p><code>Inline code</code></p><p><span style=\"color: rgb(255, 77, 79)\">Text with color</span></p><p>Text with highlight background</p><p>Text with indent</p><p></p>\n";
|
|
6
|
+
export declare const BasicFeaturesArticleJson = "\n{\"type\":\"doc\",\"content\":[{\"type\":\"title\",\"content\":[{\"type\":\"text\",\"text\":\"quasar-tiptap\"}]},{\"type\":\"heading\",\"attrs\":{\"textAlign\":\"\",\"indent\":0,\"lineHeight\":\"\",\"level\":\"2\",\"id\":\"d5fb3c\"},\"content\":[{\"type\":\"text\",\"text\":\"Introduction\"}]},{\"type\":\"paragraph\",\"attrs\":{\"textAlign\":null,\"indent\":null,\"lineHeight\":null}}]}\n";
|
|
7
|
+
export declare const FullFeaturedArticle = "\n<h1>quasar-tiptap</h1><h2 id=\"d5fb3c\" level=\"2\">Introduction</h2><blockquote><p><strong><span style=\"color: #1890ff\">Quasar Tiptap Editor</span></strong> is a WYSIWYG rich-text editor built on top of tiptap and Quasar.\uD83D\uDD25</p></blockquote><p></p><h2 id=\"ce7176\" level=\"2\">Diagram</h2><p></p><diagram src=\"graph TD\nA[Christmas] -->|Get money| B(Go shopping)\nB --> C{Let me think}\nC -->|One| D[Laptop]\nC -->|Two| E[iPhonee]\nC -->|Three| F[Cars]\"></diagram><h2 id=\"a4baf0\" level=\"2\">Math</h2><p><span style=\"color: rgb(0, 0, 0)\"><span style=\"font-family: Roboto, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif\">Write inline formula, such as </span></span><ki src=\"\\Gamma(n) = (n-1)!\\quad\\forall n\\in\\mathbb N\"></ki>\uFF0Cor block formula:</p><p></p><katex src=\"E=mc^2\"></katex><p></p><katex src=\"e^x=\\lim_{n\\to\\infty} \\left( 1+\\frac{x}{n} \\right)^n\"></katex><h2 id=\"2c1e92\" level=\"2\">Code</h2><blockquote></blockquote><pre><code>const name = 'JavaScript'\nconsole.log('Hello, world', name)</code></pre><pre><code>package main\n\nimport \"fmt\"\n\nfunc main() {\n fmt.Println(\"Hello, world!\")\n}</code></pre><h2 id=\"f0df1b\" level=\"2\">Table</h2><table><tbody><tr><th><p data-text-align=\"center\">Title</p></th><th><p data-text-align=\"center\">Name</p></th><th><p data-text-align=\"center\">Description</p></th></tr><tr><td><p data-text-align=\"center\">1</p></td><td><p data-text-align=\"center\">2</p></td><td><p>3</p></td></tr><tr><td><p data-text-align=\"right\">a</p></td><td><p data-text-align=\"right\">b</p></td><td><p data-text-align=\"right\">c</p></td></tr></tbody></table><p></p><h2 id=\"3b0d30\" level=\"2\">Text</h2><p><strong><span style=\"font-family: Arial Black\">Bold text</span></strong></p><p><em>Italic text</em></p><p><u>Underline text</u></p><p><s>Strike through text</s></p><p><code>Inline code</code></p><p><span style=\"color: #ff4d4f\">Text with color</span></p><p><span style=\"background: #ffec3d\">Text with </span><span style=\"color: #ffffff\"><span style=\"background: #52c41a\">highlight</span></span><span style=\"background: #ffec3d\"> background</span></p><p data-indent=\"1\">Text with indent</p><h2 id=\"f0df1b\" level=\"2\">Image</h2><p data-text-align=\"center\"><img src=\"https://www.donote.info/statics/logo.png\"></p><p></p><h2 id=\"5aced7\" level=\"2\">List</h2><h3 id=\"55b8b4\" level=\"3\">Unordered List</h3><ul><li><p>List Item 1</p></li><li><p>List Item 2</p></li><li><p>List Item 3</p></li></ul><h3 id=\"f7d0cf\" level=\"3\">Ordered List</h3><ol><li><p>Item 1</p></li><li><p>Item 2</p></li><li><p>Item 3</p></li></ol><h3 id=\"6572ee\" level=\"3\">Todo List</h3><ul data-type=\"todo_list\"><li data-type=\"todo_item\" data-done=\"false\"><span class=\"todo-checkbox\" contenteditable=\"false\"></span><div class=\"todo-content\"><p>Task 1</p></div></li><li data-type=\"todo_item\" data-done=\"false\"><span class=\"todo-checkbox\" contenteditable=\"false\"></span><div class=\"todo-content\"><p>Task 2</p></div></li><li data-type=\"todo_item\" data-done=\"true\"><span class=\"todo-checkbox\" contenteditable=\"false\"></span><div class=\"todo-content\"><p>Task 3, done</p></div></li></ul><p></p>\n";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Empty Blocks
|
|
3
|
+
*/
|
|
4
|
+
export declare const EmptyParagraph: {
|
|
5
|
+
type: string;
|
|
6
|
+
content: any[];
|
|
7
|
+
}[];
|
|
8
|
+
export declare const EmptyListItem: {
|
|
9
|
+
type: string;
|
|
10
|
+
content: {
|
|
11
|
+
type: string;
|
|
12
|
+
content: any[];
|
|
13
|
+
}[];
|
|
14
|
+
}[];
|
|
15
|
+
export declare const EmptyTaskItem: {
|
|
16
|
+
type: string;
|
|
17
|
+
content: {
|
|
18
|
+
type: string;
|
|
19
|
+
content: any[];
|
|
20
|
+
}[];
|
|
21
|
+
}[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Languages: BlockOption[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Menu
|
|
3
|
+
*/
|
|
4
|
+
export declare const DefaultMenu: string[];
|
|
5
|
+
/**
|
|
6
|
+
* Table toolbar
|
|
7
|
+
*/
|
|
8
|
+
export declare const TableMenu: string[];
|
|
9
|
+
/**
|
|
10
|
+
* Bubble toolbar
|
|
11
|
+
*/
|
|
12
|
+
export declare const DefaultBubble: string[];
|
|
13
|
+
export declare const LinkBubble: string[];
|
|
14
|
+
export declare const ImageBubble: string[];
|
|
15
|
+
export declare const ImageLinkBubble: string[];
|
|
16
|
+
export declare const MoreBubble: string[];
|
|
17
|
+
export declare const TableBubble: string[];
|
|
18
|
+
export declare const TableWrapperBubble: string[];
|
|
19
|
+
/**
|
|
20
|
+
* Floating Menu
|
|
21
|
+
*/
|
|
22
|
+
export declare const DefaultFloating: string[];
|
|
23
|
+
export declare const TableFloating: string[];
|
|
24
|
+
export declare const DefaultEmbedServices: {
|
|
25
|
+
video: string[];
|
|
26
|
+
map: string[];
|
|
27
|
+
design: string[];
|
|
28
|
+
develop: string[];
|
|
29
|
+
data: string[];
|
|
30
|
+
others: string[];
|
|
31
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
declare module '@tiptap/core' {
|
|
3
|
+
interface Commands<ReturnType> {
|
|
4
|
+
callout: {
|
|
5
|
+
/**
|
|
6
|
+
* Set a callout node
|
|
7
|
+
*/
|
|
8
|
+
setCallout: () => ReturnType;
|
|
9
|
+
/**
|
|
10
|
+
* Toggle a callout node
|
|
11
|
+
*/
|
|
12
|
+
toggleCallout: () => ReturnType;
|
|
13
|
+
/**
|
|
14
|
+
* Unset a callout node
|
|
15
|
+
*/
|
|
16
|
+
unsetCallout: () => ReturnType;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
declare const _default: Node<any, any>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extensions Dynamic
|
|
3
|
+
*/
|
|
4
|
+
declare class DynamicClass {
|
|
5
|
+
constructor(name: string);
|
|
6
|
+
}
|
|
7
|
+
export default DynamicClass;
|
|
8
|
+
export declare const getDynamicExtension: (name: string) => DynamicClass;
|
|
9
|
+
export declare const TableExtensions: import("@tiptap/core").Node<any, any>[];
|
|
10
|
+
export declare const TableExtensions1: any[];
|
|
11
|
+
export declare const TableExtensions0: import("@tiptap/core").Node<import("@tiptap/extension-table-cell").TableCellOptions, any>[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* see https://tiptap.dev/docs/editor/api/extensions/focus
|
|
3
|
+
*/
|
|
4
|
+
import { Extension } from '@tiptap/core';
|
|
5
|
+
export interface FocusOptions {
|
|
6
|
+
className: string;
|
|
7
|
+
mode: 'all' | 'deepest' | 'shallowest';
|
|
8
|
+
}
|
|
9
|
+
declare const Focus: Extension<FocusOptions, any>;
|
|
10
|
+
export default Focus;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { default as OBlockquote } from './blockquote';
|
|
2
|
+
export { default as OCallout } from './callout';
|
|
3
|
+
export { default as OCodeBlock } from './code-block';
|
|
4
|
+
export { default as OColorHighlighter } from './color-highlighter';
|
|
5
|
+
export { default as OFocus } from './focus';
|
|
6
|
+
export { default as OHeading } from './heading';
|
|
7
|
+
export { default as OHorizontalRule } from './horizontal-rule';
|
|
8
|
+
export { default as OImage } from './image';
|
|
9
|
+
export { default as OLink } from './link';
|
|
10
|
+
export { default as OParagraph } from './paragraph';
|
|
11
|
+
export { default as OPlaceholder } from './placeholder';
|
|
12
|
+
export { default as OTable } from './table';
|
|
13
|
+
export { default as OTableCell } from './table-cell';
|
|
14
|
+
export { default as OTableHeader } from './table-header';
|
|
15
|
+
export { default as OTableWrapper } from './table-wrapper';
|
|
16
|
+
export { default as OTrailingNode } from './trailing-node';
|
|
17
|
+
export { default as OUniqueID } from './unique-id-simple';
|
|
18
|
+
export { default as OVideo } from './video';
|
|
19
|
+
export declare const DefaultExtensions: string[];
|
|
20
|
+
export declare const TipTapExtensions: string[];
|
|
21
|
+
export declare const ExtendedExtensions: string[];
|
|
22
|
+
export declare const BuiltinExtensions: string[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Editor, Extension } from '@tiptap/core';
|
|
2
|
+
import { Node as ProsemirrorNode } from '@tiptap/pm/model';
|
|
3
|
+
export interface PlaceholderOptions {
|
|
4
|
+
emptyEditorClass: string;
|
|
5
|
+
emptyNodeClass: string;
|
|
6
|
+
placeholder: ((PlaceholderProps: {
|
|
7
|
+
editor: Editor;
|
|
8
|
+
node: ProsemirrorNode;
|
|
9
|
+
pos: number;
|
|
10
|
+
hasAnchor: boolean;
|
|
11
|
+
}) => string) | string;
|
|
12
|
+
showOnlyWhenEditable: boolean;
|
|
13
|
+
showOnlyCurrent: boolean;
|
|
14
|
+
includeChildren: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const Placeholder: Extension<PlaceholderOptions, any>;
|
|
17
|
+
export default Placeholder;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Side menu plugin
|
|
3
|
+
*
|
|
4
|
+
* Plugin docs: https://prosemirror.net/docs/ref/#state.Plugin_System
|
|
5
|
+
* Plugin state example: https://github.com/remirror/remirror/blob/main/packages/remirror__extension-code-block/src/code-block-plugin.ts
|
|
6
|
+
*/
|
|
7
|
+
import type { Editor } from '@tiptap/core';
|
|
8
|
+
import { EditorState, Plugin, PluginKey } from '@tiptap/pm/state';
|
|
9
|
+
import { EditorView } from '@tiptap/pm/view';
|
|
10
|
+
import type { Instance, Props } from 'tippy.js';
|
|
11
|
+
export declare const SideMenuPluginKey: PluginKey<any>;
|
|
12
|
+
export declare class SideMenuState {
|
|
13
|
+
hovered: boolean;
|
|
14
|
+
coords: {
|
|
15
|
+
left: number;
|
|
16
|
+
top: number;
|
|
17
|
+
};
|
|
18
|
+
className: string;
|
|
19
|
+
constructor();
|
|
20
|
+
init(state: EditorState): this;
|
|
21
|
+
apply({ tr, oldState, newState }: {
|
|
22
|
+
tr: any;
|
|
23
|
+
oldState: any;
|
|
24
|
+
newState: any;
|
|
25
|
+
}): this;
|
|
26
|
+
setHover(hover: boolean, coords: {
|
|
27
|
+
left: number;
|
|
28
|
+
top: number;
|
|
29
|
+
}, className?: string): void;
|
|
30
|
+
}
|
|
31
|
+
export interface SideMenuPluginProps {
|
|
32
|
+
pluginKey: PluginKey | string;
|
|
33
|
+
editor: Editor;
|
|
34
|
+
element: HTMLElement;
|
|
35
|
+
tippyOptions?: Partial<Props>;
|
|
36
|
+
updateDelay?: number;
|
|
37
|
+
}
|
|
38
|
+
export type SideMenuViewProps = SideMenuPluginProps & {
|
|
39
|
+
view: EditorView;
|
|
40
|
+
};
|
|
41
|
+
export declare class SideMenuView {
|
|
42
|
+
editor: Editor;
|
|
43
|
+
element: HTMLElement;
|
|
44
|
+
view: EditorView;
|
|
45
|
+
preventHide: boolean;
|
|
46
|
+
tippy: Instance | undefined;
|
|
47
|
+
tippyOptions?: Partial<Props>;
|
|
48
|
+
updateDelay: number;
|
|
49
|
+
private updateDebounceTimer;
|
|
50
|
+
constructor({ editor, element, view, tippyOptions, updateDelay, }: SideMenuViewProps);
|
|
51
|
+
mousedownHandler: () => void;
|
|
52
|
+
onDragStart: (e: MouseEvent) => void;
|
|
53
|
+
blurHandler: ({ event }: {
|
|
54
|
+
event: FocusEvent;
|
|
55
|
+
}) => void;
|
|
56
|
+
tippyBlurHandler: (event: FocusEvent) => void;
|
|
57
|
+
createTooltip(): void;
|
|
58
|
+
update(view: EditorView, oldState?: EditorState): void;
|
|
59
|
+
handleDebouncedUpdate: (view: EditorView, oldState?: EditorState) => void;
|
|
60
|
+
updateHandler: (view: EditorView, selectionChanged: boolean, docChanged: boolean, oldState?: EditorState) => void;
|
|
61
|
+
show(): void;
|
|
62
|
+
hide(): void;
|
|
63
|
+
destroy(): void;
|
|
64
|
+
}
|
|
65
|
+
export declare class SideMenuPlugin {
|
|
66
|
+
options: SideMenuPluginProps;
|
|
67
|
+
readonly plugin: Plugin;
|
|
68
|
+
sideMenuView: SideMenuView | undefined;
|
|
69
|
+
constructor(options: SideMenuPluginProps);
|
|
70
|
+
dragstart(e: DragEvent): void;
|
|
71
|
+
dragend(e: DragEvent): void;
|
|
72
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Side menu utils
|
|
3
|
+
*
|
|
4
|
+
* @author YousefED@BlockNote
|
|
5
|
+
* see https://github.com/TypeCellOS/BlockNote/blob/main/packages/core/src/extensions/SideMenu/SideMenuPlugin.ts
|
|
6
|
+
*/
|
|
7
|
+
import { Editor } from '@tiptap/core';
|
|
8
|
+
import { EditorView } from '@tiptap/pm/view';
|
|
9
|
+
import { Node, NodeType } from '@tiptap/pm/model';
|
|
10
|
+
import type { Selection } from '@tiptap/pm/state';
|
|
11
|
+
export declare function getNodeElementFromCoords(coords: {
|
|
12
|
+
left: number;
|
|
13
|
+
top: number;
|
|
14
|
+
}, view: EditorView): HTMLElement;
|
|
15
|
+
export declare function getNodeElementFromPos(pos: number, view: EditorView): HTMLElement;
|
|
16
|
+
export declare function getNodeViewElementFromPos(pos: number, view: EditorView): HTMLElement;
|
|
17
|
+
export declare function getNodePosFromCoords(coords: {
|
|
18
|
+
left: number;
|
|
19
|
+
top: number;
|
|
20
|
+
}, view: EditorView): any;
|
|
21
|
+
export declare function getNodePosFromSelection(selection: Selection, doc: Node): {
|
|
22
|
+
from: number;
|
|
23
|
+
to: number;
|
|
24
|
+
};
|
|
25
|
+
export type BlockInfoWithoutPositions = {
|
|
26
|
+
id: string;
|
|
27
|
+
node: Node;
|
|
28
|
+
contentNode: Node;
|
|
29
|
+
contentType: NodeType;
|
|
30
|
+
numChildBlocks: number;
|
|
31
|
+
};
|
|
32
|
+
export type BlockInfo = BlockInfoWithoutPositions & {
|
|
33
|
+
startPos: number;
|
|
34
|
+
endPos: number;
|
|
35
|
+
depth: number;
|
|
36
|
+
};
|
|
37
|
+
export declare function getNodeInfo(blockContainer: Node): BlockInfoWithoutPositions;
|
|
38
|
+
export declare function getNodeInfoFromPos(doc: Node, pos: number): BlockInfo;
|
|
39
|
+
export declare function getNodeInfoFromCoords(editor: Editor, view: EditorView, coords: {
|
|
40
|
+
left: number;
|
|
41
|
+
top: number;
|
|
42
|
+
}): BlockInfo;
|
|
43
|
+
export type NodeInfo = {
|
|
44
|
+
node: Node | null;
|
|
45
|
+
pos: number;
|
|
46
|
+
};
|
|
47
|
+
export declare function getNodeFromCoords(coords: {
|
|
48
|
+
left: number;
|
|
49
|
+
top: number;
|
|
50
|
+
}, editor: Editor): NodeInfo;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
export interface SuggestionOptions {
|
|
3
|
+
editor: Editor;
|
|
4
|
+
event: KeyboardEvent;
|
|
5
|
+
clientRect?: (() => DOMRect | null) | null;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: {
|
|
8
|
+
items: ({ query }: {
|
|
9
|
+
query: string;
|
|
10
|
+
}) => BlockOption[];
|
|
11
|
+
render: () => {
|
|
12
|
+
onStart: (props: SuggestionOptions) => void;
|
|
13
|
+
onUpdate(props: SuggestionOptions): void;
|
|
14
|
+
onKeyDown(props: SuggestionOptions): any;
|
|
15
|
+
onExit(): void;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
items: {
|
|
3
|
+
type: () => Indexable[];
|
|
4
|
+
required: true;
|
|
5
|
+
default: () => any[];
|
|
6
|
+
};
|
|
7
|
+
command: {
|
|
8
|
+
type: FunctionConstructor;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
editor: {
|
|
12
|
+
type: ObjectConstructor;
|
|
13
|
+
};
|
|
14
|
+
range: {
|
|
15
|
+
type: ObjectConstructor;
|
|
16
|
+
};
|
|
17
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
items: {
|
|
19
|
+
type: () => Indexable[];
|
|
20
|
+
required: true;
|
|
21
|
+
default: () => any[];
|
|
22
|
+
};
|
|
23
|
+
command: {
|
|
24
|
+
type: FunctionConstructor;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
editor: {
|
|
28
|
+
type: ObjectConstructor;
|
|
29
|
+
};
|
|
30
|
+
range: {
|
|
31
|
+
type: ObjectConstructor;
|
|
32
|
+
};
|
|
33
|
+
}>>, {
|
|
34
|
+
items: Indexable<any>[];
|
|
35
|
+
}, {}>;
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
items: {
|
|
3
|
+
type: () => Indexable[];
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
command: {
|
|
7
|
+
type: FunctionConstructor;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
editor: {
|
|
11
|
+
type: ObjectConstructor;
|
|
12
|
+
};
|
|
13
|
+
range: {
|
|
14
|
+
type: ObjectConstructor;
|
|
15
|
+
};
|
|
16
|
+
}, {
|
|
17
|
+
locale: {
|
|
18
|
+
value: string;
|
|
19
|
+
};
|
|
20
|
+
tr: (key: string) => any;
|
|
21
|
+
onCommand: (commands: import("@tiptap/core").SingleCommands, focus: import("@tiptap/core").ChainedCommands, command: string, options?: Indexable<any>) => void;
|
|
22
|
+
}, {
|
|
23
|
+
view: string;
|
|
24
|
+
selectedIndex: number;
|
|
25
|
+
}, {
|
|
26
|
+
basicBlocks(): BlockOption[];
|
|
27
|
+
}, {
|
|
28
|
+
onClick(item: Indexable): true;
|
|
29
|
+
run(item: Indexable): void;
|
|
30
|
+
onKeyDown({ event }: {
|
|
31
|
+
event: any;
|
|
32
|
+
}): boolean;
|
|
33
|
+
upHandler(): void;
|
|
34
|
+
downHandler(): void;
|
|
35
|
+
enterHandler(): void;
|
|
36
|
+
selectItem(index: number): void;
|
|
37
|
+
setEmoji(emoji: string): void;
|
|
38
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
39
|
+
items: {
|
|
40
|
+
type: () => Indexable[];
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
command: {
|
|
44
|
+
type: FunctionConstructor;
|
|
45
|
+
required: true;
|
|
46
|
+
};
|
|
47
|
+
editor: {
|
|
48
|
+
type: ObjectConstructor;
|
|
49
|
+
};
|
|
50
|
+
range: {
|
|
51
|
+
type: ObjectConstructor;
|
|
52
|
+
};
|
|
53
|
+
}>>, {}, {}>;
|
|
54
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Node as ProseMirrorNode } from '@tiptap/pm/model';
|
|
2
|
+
import { EditorView, type NodeView } from '@tiptap/pm/view';
|
|
3
|
+
export declare function updateColumns(node: ProseMirrorNode, colgroup: Element, table: Element, cellMinWidth: number, overrideCol?: number, overrideValue?: any): void;
|
|
4
|
+
export declare class TableView implements NodeView {
|
|
5
|
+
node: ProseMirrorNode;
|
|
6
|
+
cellMinWidth: number;
|
|
7
|
+
view: EditorView;
|
|
8
|
+
dom: HTMLElement;
|
|
9
|
+
table: HTMLElement;
|
|
10
|
+
colgroup: HTMLElement;
|
|
11
|
+
contentDOM: HTMLElement;
|
|
12
|
+
constructor(node: ProseMirrorNode, cellMinWidth: number, view: EditorView);
|
|
13
|
+
update(node: ProseMirrorNode): boolean;
|
|
14
|
+
ignoreMutation(mutation: MutationRecord | {
|
|
15
|
+
type: 'selection';
|
|
16
|
+
target: Element;
|
|
17
|
+
}): boolean;
|
|
18
|
+
}
|