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 @@