Skip to content

Commit d9a0043

Browse files
committed
docs: fix table demo
1 parent 8133337 commit d9a0043

2 files changed

Lines changed: 8 additions & 24 deletions

File tree

packages/docs/fluent-editor/demos/i18n.vue

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,6 @@ let editor: FluentEditor
1919
const editorRef = ref<HTMLElement>()
2020
const lang = ref('en-US')
2121
22-
const TOOLBAR_CONFIG = [
23-
['undo', 'redo', 'clean', 'format-painter'],
24-
[
25-
// 请保留默认值为 false
26-
{ header: [1, 2, 3, 4, 5, 6, false] },
27-
{ font: [false, '宋体', '微软雅黑', '楷体', '黑体', '隶书', 'andale mono', 'arial', 'arial black', 'comic sans ms', 'impact', 'times new roman'] },
28-
{ size: [false, '12px', '14px', '16px', '18px', '20px', '24px', '32px', '36px', '48px', '72px'] },
29-
{ 'line-height': [false, '1.2', '1.5', '1.75', '2', '3', '4', '5'] },
30-
],
31-
['bold', 'italic', 'strike', 'underline', 'divider'],
32-
[{ color: [] }, { background: [] }],
33-
[{ align: '' }, { align: 'center' }, { align: 'right' }, { align: 'justify' }],
34-
[{ list: 'ordered' }, { list: 'bullet' }, { list: 'check' }],
35-
[{ script: 'sub' }, { script: 'super' }],
36-
[{ indent: '-1' }, { indent: '+1' }],
37-
[{ direction: 'rtl' }],
38-
['link', 'blockquote', 'code', 'code-block'],
39-
['image', 'file'],
40-
['emoji', 'video', 'formula', 'screenshot', 'fullscreen'],
41-
[{ 'table-up': [] }],
42-
]
43-
4422
onMounted(async () => {
4523
// ssr compat, reference: https://vitepress.dev/guide/ssr-compat#importing-in-mounted-hook
4624
const [

packages/docs/fluent-editor/demos/table-up-resize.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ onMounted(async () => {
4343
editorLine = new FluentEditor(editorLineRef.value, {
4444
theme: 'snow',
4545
modules: {
46-
'toolbar': TOOLBAR_CONFIG,
46+
'toolbar': [
47+
...DEFAULT_TOOLBAR,
48+
[{ 'table-up': [] }],
49+
],
4750
'table-up': {
4851
customSelect: defaultCustomSelect,
4952
modules: [
@@ -57,7 +60,10 @@ onMounted(async () => {
5760
editorScale = new FluentEditor(editorScaleRef.value, {
5861
theme: 'snow',
5962
modules: {
60-
'toolbar': TOOLBAR_CONFIG,
63+
'toolbar': [
64+
...DEFAULT_TOOLBAR,
65+
[{ 'table-up': [] }],
66+
],
6167
'table-up': {
6268
customSelect: defaultCustomSelect,
6369
modules: [

0 commit comments

Comments
 (0)