Skip to content

Commit e18dd6c

Browse files
authored
feat: adapt to tiny-editor demo (#92)
1 parent 8cfa724 commit e18dd6c

3 files changed

Lines changed: 56 additions & 32 deletions

File tree

.vitepress/config.mts

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,30 @@ const TinyEditorSidebar = [
3131
},
3232
{
3333
text: '使用示例',
34-
base: '/tiny-editor/demo/',
3534
items: [
36-
{ text: '基本用法', link: 'basic-usage' },
37-
{ text: '内容初始化', link: 'set-content' },
38-
{ text: '获取内容', link: 'get-content' },
39-
{ text: '自定义工具栏', link: 'custom-toolbar' },
40-
{ text: '增加工具栏', link: 'add-toolbar-item' },
41-
{ text: '文件上传', link: 'file-upload' },
42-
{ text: '代码块高亮', link: 'code-block-highlight' },
43-
{ text: '表格', link: 'table-up' },
44-
{ text: '@提醒', link: 'mention' },
45-
{ text: '快捷菜单', link: 'shortcut-key' },
46-
{ text: '插入表情', link: 'emoji' },
47-
{ text: '格式刷', link: 'format-painter' },
48-
{ text: '公式', link: 'formula' },
49-
{ text: 'Markdown', link: 'markdown' },
50-
{ text: '字符统计', link: 'counter' },
51-
{ text: '截屏', link: 'screenshot' },
52-
{ text: '国际化', link: 'i18n' },
53-
{ text: '标题列表', link: 'header-list' },
54-
{ text: '工具栏提示', link: 'toolbar-tip' },
55-
{ text: '只读模式', link: 'readonly' },
35+
{ text: '基本用法', link: '/tiny-editor/demo/basic-usage' },
36+
{ text: '内容初始化', link: '/tiny-editor/demo/set-content' },
37+
{ text: '获取内容', link: '/tiny-editor/demo/get-content' },
38+
{ text: '自定义工具栏', link: '/tiny-editor/demo/custom-toolbar' },
39+
{ text: '增加工具栏', link: '/tiny-editor/demo/add-toolbar-item' },
40+
{ text: '文件上传', link: '/tiny-editor/demo/file-upload' },
41+
{ text: '代码块高亮', link: '/tiny-editor/demo/code-block-highlight' },
42+
{ text: '表格', link: '/tiny-editor/demo/table-up' },
43+
{ text: '@提醒', link: '/tiny-editor/demo/mention' },
44+
{ text: '快捷菜单', link: '/tiny-editor/demo/shortcut-key' },
45+
{ text: '插入表情', link: '/tiny-editor/demo/emoji' },
46+
{ text: '格式刷', link: '/tiny-editor/demo/format-painter' },
47+
{ text: '公式', link: '/tiny-editor/demo/formula' },
48+
{ text: 'Markdown', link: '/tiny-editor/demo/markdown' },
49+
{ text: '字符统计', link: '/tiny-editor/demo/counter' },
50+
{ text: '截屏', link: '/tiny-editor/demo/screenshot' },
51+
{ text: '国际化', link: '/tiny-editor/demo/i18n' },
52+
{ text: '标题列表', link: '/tiny-editor/demo/header-list' },
53+
{ text: '工具栏提示', link: '/tiny-editor/demo/toolbar-tip' },
54+
{ text: '只读模式', link: '/tiny-editor/demo/readonly' },
5655
{ text: '模拟语雀文档', link: 'https://opentiny.github.io/tiny-editor/projects' },
57-
{ text: '图片工具栏', link: 'image-tool' },
58-
{ text: '协同编辑', link: 'collaborative-editing' }
56+
{ text: '图片工具栏', link: '/tiny-editor/demo/image-tool' },
57+
{ text: '协同编辑', link: '/tiny-editor/demo/collaborative-editing' }
5958
]
6059
},
6160
{

.vitepress/theme/components/CustomHeader.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -452,14 +452,14 @@ const productTabs = computed(() => [
452452
activeProductTab.value === "tiny-engine" ? "active" : "normal"
453453
}-tiny-engine.svg`,
454454
},
455-
// {
456-
// key: "tiny-editor",
457-
// name: "TinyEditor",
458-
// link: `${prefix}tiny-editor/guide/quick-start`,
459-
// src: `${prefix}images/logo-${
460-
// activeProductTab.value === "tiny-editor" ? "active" : "normal"
461-
// }-tiny-editor.svg`,
462-
// },
455+
{
456+
key: "tiny-editor",
457+
name: "TinyEditor",
458+
link: `${prefix}tiny-editor/guide/quick-start`,
459+
src: `${prefix}images/logo-${
460+
activeProductTab.value === "tiny-editor" ? "active" : "normal"
461+
}-tiny-editor.svg`,
462+
},
463463
{
464464
key: "web-agent",
465465
name: "WebAgent",

package.json

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,32 @@
2020
"mermaid": "^11.12.2",
2121
"vitepress": "^1.6.3",
2222
"vitepress-demo-plugin": "1.5.0",
23-
"vitepress-plugin-tabs": "^0.7.3"
23+
"vitepress-plugin-tabs": "^0.7.3",
24+
"@emoji-mart/data": "^1.2.1",
25+
"@floating-ui/dom": "^1.7.2",
26+
"@logicflow/core": "^2.0.16",
27+
"@logicflow/extension": "^2.0.21",
28+
"@opentiny/fluent-editor": "^4.1.0",
29+
"emoji-mart": "^5.6.0",
30+
"highlight.js": "^10.2.0",
31+
"html2canvas": "^1.4.1",
32+
"katex": "^0.16.11",
33+
"mathlive": "^0.101.0",
34+
"quill-cursors": "^4.0.3",
35+
"quill-header-list": "0.0.2",
36+
"quill-markdown-shortcuts": "^0.0.10",
37+
"quill-table-up": "^3.3.0",
38+
"quill-toolbar-tip": "^0.0.13",
39+
"simple-mind-map": "0.14.0-fix.1",
40+
"simple-mind-map-plugin-themes": "^1.0.1",
41+
"vue": "^3.5.13",
42+
"vue-toastification": "2.0.0-rc.5",
43+
"y-indexeddb": "^9.0.12",
44+
"y-protocols": "^1.0.6",
45+
"y-quill": "^1.0.0",
46+
"y-webrtc": "^10.3.0",
47+
"y-websocket": "^3.0.0",
48+
"yjs": "^13.6.27"
2449
},
2550
"dependencies": {
2651
"vue": "^3.5.13"

0 commit comments

Comments
 (0)