diff --git a/ruoyi-ui/src/assets/icons/svg/rich-text.svg b/ruoyi-ui/src/assets/icons/svg/rich-text.svg new file mode 100644 index 00000000..76c45bfe --- /dev/null +++ b/ruoyi-ui/src/assets/icons/svg/rich-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ruoyi-ui/src/utils/generator/html.js b/ruoyi-ui/src/utils/generator/html.js index ac7846cd..7b55ecd5 100644 --- a/ruoyi-ui/src/utils/generator/html.js +++ b/ruoyi-ui/src/utils/generator/html.js @@ -271,6 +271,12 @@ const tags = { if (child) child = `\n${child}\n` // 换行 return `<${el.__config__.tag} ${ref} ${fileList} ${action} ${autoUpload} ${multiple} ${beforeUpload} ${listType} ${accept} ${name} ${disabled}>${child}` + }, + tinymce: el => { + const { tag, vModel, placeholder } = attrBuilder(el) + const height = el.height ? `:height="${el.height}"` : '' + const branding = el.branding ? `:branding="${el.branding}"` : '' + return `<${tag} ${vModel} ${placeholder} ${height} ${branding}>` } } diff --git a/ruoyi-ui/src/views/tool/build/index.vue b/ruoyi-ui/src/views/tool/build/index.vue index fb6c0c56..8a279a8a 100644 --- a/ruoyi-ui/src/views/tool/build/index.vue +++ b/ruoyi-ui/src/views/tool/build/index.vue @@ -154,6 +154,7 @@ import CodeTypeDialog from './CodeTypeDialog' import DraggableItem from './DraggableItem' import { getDrawingList, saveDrawingList, getIdGlobal, saveIdGlobal, getFormConf } from '@/utils/db' import loadBeautifier from '@/utils/loadBeautifier' +import Tinymce from '@/components/tinymce/index.vue' import { getForm, addForm, updateForm } from '@/api/workflow/form' import axios from 'axios' import Vue from 'vue'; @@ -165,6 +166,7 @@ let tempActiveData const drawingListInDB = getDrawingList() const formConfInDB = getFormConf() const idGlobal = getIdGlobal() +Vue.component('tinymce', Tinymce) Vue.prototype.$axios = axios export default {