fix: 修复input-rich-text组件提测问题 amis-saas-9971 amis-saas-9977 amis-saas-9968 amis-saas-9968 amis-saas-10058

Change-Id: Ic90dba0bd88c5ea7107293cf27d96237a452ae4b
This commit is contained in:
zhou999 2023-03-02 16:07:42 +08:00
parent f4633fbb00
commit 637b1a05c9

View File

@ -11,6 +11,31 @@ import {ValidatorTag} from '../../validator';
const tinymceToolbarsDelimiter = ' '; const tinymceToolbarsDelimiter = ' ';
const tinymceOptions = [
'advlist',
'autolink',
'link',
'image',
'lists',
'charmap',
'preview',
'anchor',
'pagebreak',
'searchreplace',
'wordcount',
'visualblocks',
'visualchars',
'code',
'fullscreen',
'insertdatetime',
'media',
'nonbreaking',
'table',
'emoticons',
'template',
'help'
];
const tinymceToolbars = [ const tinymceToolbars = [
'undo', 'undo',
'redo', 'redo',
@ -105,7 +130,6 @@ const tinymceToolbars = [
const froalaOptions = [ const froalaOptions = [
'paragraphFormat', 'paragraphFormat',
'quote', 'quote',
'color',
'bold', 'bold',
'italic', 'italic',
'underline', 'underline',
@ -115,7 +139,6 @@ const froalaOptions = [
'align', 'align',
'insertLink', 'insertLink',
'insertImage', 'insertImage',
'insertEmotion',
'insertTable', 'insertTable',
'undo', 'undo',
'redo', 'redo',
@ -226,36 +249,13 @@ export class RichTextControlPlugin extends BasePlugin {
'查看 https://www.tiny.cloud/docs/general-configuration-guide/basic-setup/ 文档'), '查看 https://www.tiny.cloud/docs/general-configuration-guide/basic-setup/ 文档'),
name: 'options.plugins', name: 'options.plugins',
visibleOn: 'data.vendor === "tinymce"', visibleOn: 'data.vendor === "tinymce"',
defaultCheckAll: true, value: [...tinymceOptions].join(','),
maxTagCount: 5, maxTagCount: 5,
overflowTagPopover: { overflowTagPopover: {
title: '插件', title: '插件',
offset: [0, 5] offset: [0, 5]
}, },
options: [ options: tinymceOptions
'advlist',
'autolink',
'link',
'image',
'lists',
'charmap',
'preview',
'anchor',
'pagebreak',
'searchreplace',
'wordcount',
'visualblocks',
'visualchars',
'code',
'fullscreen',
'insertdatetime',
'media',
'nonbreaking',
'table',
'emoticons',
'template',
'help'
]
}, },
{ {
type: 'select', type: 'select',
@ -298,7 +298,7 @@ export class RichTextControlPlugin extends BasePlugin {
'工具栏-大屏', '工具栏-大屏',
'屏幕宽度≥1200px参考文档https://froala.com/wysiwyg-editor/docs/options/' '屏幕宽度≥1200px参考文档https://froala.com/wysiwyg-editor/docs/options/'
), ),
defaultCheckAll: true, value: [...froalaOptions],
joinValues: false, joinValues: false,
extractValue: true, extractValue: true,
options: [...froalaOptions], options: [...froalaOptions],
@ -381,7 +381,9 @@ export class RichTextControlPlugin extends BasePlugin {
}), }),
getSchemaTpl('labelRemark'), getSchemaTpl('labelRemark'),
getSchemaTpl('remark'), getSchemaTpl('remark'),
getSchemaTpl('placeholder'), getSchemaTpl('placeholder', {
visibleOn: 'data.vendor !== "tinymce"'
}),
getSchemaTpl('description'), getSchemaTpl('description'),
] ]
}, },
@ -414,14 +416,7 @@ export class RichTextControlPlugin extends BasePlugin {
] ]
}, },
getSchemaTpl('style:formItem', { getSchemaTpl('style:formItem', {
renderer: context.info.renderer, renderer: context.info.renderer
schema: [
getSchemaTpl('switch', {
label: '内联模式',
name: 'inline',
pipeIn: defaultValue(false)
}),
]
}), }),
getSchemaTpl('style:classNames') getSchemaTpl('style:classNames')
]) ])