From 5e7021b0f1eb6652eb441112e7678aac5904d6ff Mon Sep 17 00:00:00 2001 From: wuyiping0628 <1106773985@qq.com> Date: Tue, 27 Jan 2026 21:39:12 -0800 Subject: [PATCH 1/7] feat: add tiny-editor submodule --- .gitmodules | 3 +++ tiny-editor | 1 + 2 files changed, 4 insertions(+) create mode 160000 tiny-editor diff --git a/.gitmodules b/.gitmodules index d511bc1..5f84b11 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "genui/genui-sdk"] path = genui/genui-sdk url = git@github.com:opentiny/genui-sdk.git +[submodule "tiny-editor"] + path = tiny-editor + url = git@github.com:opentiny/tiny-editor.git diff --git a/tiny-editor b/tiny-editor new file mode 160000 index 0000000..8553175 --- /dev/null +++ b/tiny-editor @@ -0,0 +1 @@ +Subproject commit 8553175909eca09b6e5d3780ac4e99ae2fa43b87 From 3f067ca1651b4c0863e0ddfa60ed77d6bb407eb4 Mon Sep 17 00:00:00 2001 From: wuyiping0628 <1106773985@qq.com> Date: Thu, 29 Jan 2026 10:26:16 -0800 Subject: [PATCH 2/7] feat: add tiny-editor docs --- .vitepress/config.mts | 73 +++++++++++++++++++- .vitepress/theme/components/CustomHeader.vue | 18 +++-- .vitepress/theme/entity/nav-tab.ts | 17 ++++- 3 files changed, 99 insertions(+), 9 deletions(-) diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 25aadaf..9414e1b 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -6,7 +6,66 @@ import { fileURLToPath } from 'url' const __dirname = path.dirname(fileURLToPath(import.meta.url)) const rootDir = path.resolve(__dirname, '..') - +const TinyEditorSidebar = [ + { + text: '基础', + base: '/tiny-editor/guide/', + items: [ + { text: '快速开始', link: 'quick-start' }, + { text: '在前端框架中使用', link: 'used-in-framework' }, + { text: '封装成组件', link: 'componentize' }, + ], + }, + { + text: '使用示例', + base: '/tiny-editor/demo/', + items: [ + { text: '基本用法', link: 'basic-usage' }, + { text: '内容初始化', link: 'set-content' }, + { text: '获取内容', link: 'get-content' }, + { text: '自定义工具栏', link: 'custom-toolbar' }, + { text: '增加工具栏', link: 'add-toolbar-item' }, + { text: '文件上传', link: 'file-upload' }, + { text: '代码块高亮', link: 'code-block-highlight' }, + { text: '表格', link: 'table-up' }, + { text: '@提醒', link: 'mention' }, + { text: '快捷菜单', link: 'shortcut-key' }, + { text: '插入表情', link: 'emoji' }, + { text: '格式刷', link: 'format-painter' }, + { text: '公式', link: 'formula' }, + { text: 'Markdown', link: 'markdown' }, + { text: '字符统计', link: 'counter' }, + { text: '截屏', link: 'screenshot' }, + { text: '国际化', link: 'i18n' }, + { text: '标题列表', link: 'header-list' }, + { text: '工具栏提示', link: 'toolbar-tip' }, + { text: '只读模式', link: 'readonly' }, + { text: '模拟语雀文档', link: 'https://opentiny.github.io/tiny-editor/projects' }, + { text: '图片工具栏', link: 'image-tool' }, + { text: 'AI', link: 'ai' }, + { text: '思维导图', link: 'mind-map' }, + { text: '流程图', link: 'flow-chart' }, + { text: '协同编辑', link: 'collaborative-editing' }, + ], + }, + { + text: 'API 参考', + base: '/tiny-editor/api/', + items: [ + { text: '配置项', link: 'options' }, + { text: 'TinyEditor 实例', link: 'fluent-editor-instance' }, + { text: 'TinyEditor 类', link: 'fluent-editor-class' }, + ], + }, + { + text: '模块生态', + base: '/tiny-editor/modules/', + items: [ + { text: '工具栏提示', link: 'toolbar-tip' }, + { text: '标题列表', link: 'header-list' }, + ], + }, + ] const normalizePath = (path: string, targetStyle: 'windows' | 'linux' = 'linux') => { if (targetStyle === 'windows') { return path.replace(/\//g, '\\') @@ -83,7 +142,11 @@ export default defineConfig({ 'tiny-engine/docs/:section(practical-cases|api|extension-capabilities-tutorial|development-getting-started|changelog|solutions|extension-capabilities-overview)/:path*': 'tiny-engine/dev/:path*', 'tiny-engine/docs/:section(ecosystem-center|about-applications|about-materials|about-designer)/:path*': - 'tiny-engine/portal/:path*' + 'tiny-engine/portal/:path*', + 'tiny-editor/packages/docs/fluent-editor/docs/guide/:path*': 'tiny-editor/guide/:path*', + 'tiny-editor/packages/docs/fluent-editor/docs/demo/:path*': 'tiny-editor/demo/:path*', + 'tiny-editor/packages/docs/fluent-editor/docs/api/:path*': 'tiny-editor/api/:path*', + 'tiny-editor/packages/docs/fluent-editor/docs/modules/:path*': 'tiny-editor/modules/:path*', }, themeConfig: { // https://vitepress.dev/reference/default-theme-config @@ -562,7 +625,11 @@ export default defineConfig({ { text: '定制设计器', link: 'customize-designer' } ] } - ] + ], + '/tiny-editor/guide/':TinyEditorSidebar, + '/tiny-editor/demo/': TinyEditorSidebar, + '/tiny-editor/api/': TinyEditorSidebar, + '/tiny-editor/modules/': TinyEditorSidebar, }, search: { provider: 'local' diff --git a/.vitepress/theme/components/CustomHeader.vue b/.vitepress/theme/components/CustomHeader.vue index 3ed238b..474e25e 100644 --- a/.vitepress/theme/components/CustomHeader.vue +++ b/.vitepress/theme/components/CustomHeader.vue @@ -23,7 +23,7 @@ :tabs="productTabs" :activeTab="activeProductTab" @tab-change="handleProductTabChange" - style="width: 610px" + style="width: 810px" /> @@ -32,7 +32,7 @@
-
+
@@ -463,6 +463,14 @@ const productTabs = computed(() => [ activeProductTab.value === "tiny-engine" ? "active" : "normal" }-tiny-engine.svg`, }, + { + key: "tiny-editor", + name: "TinyEditor", + link: `${prefix}tiny-editor/guide/quick-start`, + src: `${prefix}images/logo-${ + activeProductTab.value === "tiny-editor" ? "active" : "normal" + }-tiny-engine.svg`, + }, ]); // 切换tab时路由跳转 @@ -490,7 +498,9 @@ watch( activeProductTab.value = "tiny-vue"; } else if (path.includes("/tiny-engine/")) { activeProductTab.value = "tiny-engine"; - } else { + } else if (path.includes("/tiny-editor/")) { + activeProductTab.value = "tiny-editor"; + }else { activeProductTab.value = ""; } }, diff --git a/.vitepress/theme/entity/nav-tab.ts b/.vitepress/theme/entity/nav-tab.ts index 53d35aa..6961f2c 100644 --- a/.vitepress/theme/entity/nav-tab.ts +++ b/.vitepress/theme/entity/nav-tab.ts @@ -75,18 +75,30 @@ class GenuiSdkNavTab extends NavTab { } } +class TinyEditorNavTab extends NavTab { + constructor(activeProductTab: string, site: any, themeConfig?: any) { + super(activeProductTab, site, themeConfig) + } + + getTabs(): TabItem[] { + return [{ key: 'guide', name: '使用文档', link: '/tiny-editor/guide/quick-start' }] + } +} + const navTabClassMap: Record = { 'next-sdk': NextSdkNavTab, 'tiny-vue': TinyVueNavTab, 'tiny-engine': TinyEngineNavTab, - 'genui-sdk': GenuiSdkNavTab + 'genui-sdk': GenuiSdkNavTab, + 'tiny-editor': TinyEditorNavTab } const navPathMap: Record = { 'next-sdk': '/next-sdk/', 'tiny-vue': '/tiny-vue/', 'tiny-engine': '/tiny-engine/', - 'genui-sdk': '/genui-sdk/' + 'genui-sdk': '/genui-sdk/', + 'tiny-editor': '/tiny-editor/' } const NavTabFactory = (activeProductTab: string, route: any, site: any, themeConfig: any) => { @@ -102,4 +114,5 @@ const NavTabFactory = (activeProductTab: string, route: any, site: any, themeCon return new NavTab(activeProductTab, site, themeConfig) } + export { NavTabFactory } From ffa9ab09e630b7e30ffa71f331e5fad738485454 Mon Sep 17 00:00:00 2001 From: wuyiping0628 <1106773985@qq.com> Date: Wed, 4 Feb 2026 16:31:15 -0800 Subject: [PATCH 3/7] feat: refactoring the getActiveNavTab function --- .vitepress/theme/components/CustomHeader.vue | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.vitepress/theme/components/CustomHeader.vue b/.vitepress/theme/components/CustomHeader.vue index a7e7b57..dad33a9 100644 --- a/.vitepress/theme/components/CustomHeader.vue +++ b/.vitepress/theme/components/CustomHeader.vue @@ -341,11 +341,17 @@ const getActiveNavTab = () => { const currentTab = navigationTabs.value.find((tab: TabItem) => isActiveNav({ text: tab.name, link: tab.key, activeMatch: undefined }) ); - const ifProductTab = (activeProductTab.value === "next-sdk" && route.path.includes("/next-sdk/")) ||( activeProductTab.value === "tiny-robot" && route.path.includes("/components/"))|| (activeProductTab.value === "tiny-robot" && route.path.includes("/tools/")) - activeNavTab.value = - ifProductTab - ? "guide" - : currentTab?.key || ""; + + const productPathMap: Record = { + "next-sdk": ["/next-sdk/"], + "tiny-robot": ["/components/", "/tools/"], + "tiny-editor": ["/demo/", "/api/", "/modules/"], + }; + + const segments = productPathMap[activeProductTab.value] || []; + const isProductRoute = segments.some((seg) => route.path.includes(seg)); + + activeNavTab.value = isProductRoute ? "guide" : currentTab?.key || ""; }; // 处理导航标签变化 From a6fad118ef4fe8d472048d642418284824a3f6b6 Mon Sep 17 00:00:00 2001 From: wuyiping0628 <1106773985@qq.com> Date: Wed, 4 Feb 2026 16:46:41 -0800 Subject: [PATCH 4/7] feat: edit search icon style --- .vitepress/theme/components/CustomHeader.vue | 37 +++++--------------- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/.vitepress/theme/components/CustomHeader.vue b/.vitepress/theme/components/CustomHeader.vue index dad33a9..17b5a2a 100644 --- a/.vitepress/theme/components/CustomHeader.vue +++ b/.vitepress/theme/components/CustomHeader.vue @@ -31,35 +31,16 @@
-
- -
+ +
OpenTiny From e90dc10fa5870e4dcca5a9e0fea0957cbdd3c089 Mon Sep 17 00:00:00 2001 From: wuyiping0628 <1106773985@qq.com> Date: Thu, 5 Feb 2026 10:27:32 -0800 Subject: [PATCH 5/7] feat: add tiny-editor.svg --- .vitepress/theme/components/CustomHeader.vue | 2 +- public/images/logo-active-tiny-editor.svg | 22 ++++++++++++++++++++ public/images/logo-normal-tiny-editor.svg | 22 ++++++++++++++++++++ tiny-editor | 2 +- 4 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 public/images/logo-active-tiny-editor.svg create mode 100644 public/images/logo-normal-tiny-editor.svg diff --git a/.vitepress/theme/components/CustomHeader.vue b/.vitepress/theme/components/CustomHeader.vue index 17b5a2a..cfc2f27 100644 --- a/.vitepress/theme/components/CustomHeader.vue +++ b/.vitepress/theme/components/CustomHeader.vue @@ -457,7 +457,7 @@ const productTabs = computed(() => [ link: `${prefix}tiny-editor/guide/quick-start`, src: `${prefix}images/logo-${ activeProductTab.value === "tiny-editor" ? "active" : "normal" - }-tiny-engine.svg`, + }-tiny-editor.svg`, }, ]); diff --git a/public/images/logo-active-tiny-editor.svg b/public/images/logo-active-tiny-editor.svg new file mode 100644 index 0000000..09cab5d --- /dev/null +++ b/public/images/logo-active-tiny-editor.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/logo-normal-tiny-editor.svg b/public/images/logo-normal-tiny-editor.svg new file mode 100644 index 0000000..82c91c1 --- /dev/null +++ b/public/images/logo-normal-tiny-editor.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/tiny-editor b/tiny-editor index 8553175..4c5a836 160000 --- a/tiny-editor +++ b/tiny-editor @@ -1 +1 @@ -Subproject commit 8553175909eca09b6e5d3780ac4e99ae2fa43b87 +Subproject commit 4c5a836c4a47f8c8977b2b8cef0d2f0f8cd3c9ba From 144554615788ab02124cfbe38ad7981aea5ee33e Mon Sep 17 00:00:00 2001 From: wuyiping0628 <1106773985@qq.com> Date: Wed, 4 Feb 2026 22:32:45 -0800 Subject: [PATCH 6/7] feat: add tiny-editor submodule --- .vitepress/theme/components/CustomHeader.vue | 2 +- tiny-editor | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.vitepress/theme/components/CustomHeader.vue b/.vitepress/theme/components/CustomHeader.vue index cfc2f27..b24e5a6 100644 --- a/.vitepress/theme/components/CustomHeader.vue +++ b/.vitepress/theme/components/CustomHeader.vue @@ -488,7 +488,7 @@ watch( activeProductTab.value = "tiny-engine"; } else if (path.includes("/tiny-editor/")) { activeProductTab.value = "tiny-editor"; - }else { + } else { activeProductTab.value = ""; } }, diff --git a/tiny-editor b/tiny-editor index 4c5a836..a41f8f5 160000 --- a/tiny-editor +++ b/tiny-editor @@ -1 +1 @@ -Subproject commit 4c5a836c4a47f8c8977b2b8cef0d2f0f8cd3c9ba +Subproject commit a41f8f5a7abf543600edf167895ed3c8ed942fac From a60f8205adb614c0e92a37e07c8b8e76994ecb4f Mon Sep 17 00:00:00 2001 From: wuyiping0628 <1106773985@qq.com> Date: Wed, 4 Feb 2026 23:47:01 -0800 Subject: [PATCH 7/7] =?UTF-8?q?feat=EF=BC=9Aedit=20tiny-editor=20meun?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vitepress/config.mts | 3 --- 1 file changed, 3 deletions(-) diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 8f5ffe4..e710fd8 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -43,9 +43,6 @@ const TinyEditorSidebar = [ { text: '只读模式', link: 'readonly' }, { text: '模拟语雀文档', link: 'https://opentiny.github.io/tiny-editor/projects' }, { text: '图片工具栏', link: 'image-tool' }, - { text: 'AI', link: 'ai' }, - { text: '思维导图', link: 'mind-map' }, - { text: '流程图', link: 'flow-chart' }, { text: '协同编辑', link: 'collaborative-editing' }, ], },