diff --git a/docs/zh-CN/components/form/input-rich-text.md b/docs/zh-CN/components/form/input-rich-text.md index 7528343ab..55694564d 100755 --- a/docs/zh-CN/components/form/input-rich-text.md +++ b/docs/zh-CN/components/form/input-rich-text.md @@ -69,7 +69,9 @@ order: 47 ## tinymce 自定义配置 -可以设置 options 属性来自定义编辑器的展现,详细配置项请参考[官方文档](https://www.tiny.cloud/docs/general-configuration-guide/basic-setup/)。 +可以设置 options 属性来自定义编辑器的展现,详细配置项请参考[官方文档](https://www.tiny.cloud/docs/tinymce/6/basic-setup/)。 + +> amis 2.1.0 版本升级到了 tinymce 6,导致 plugins 的写法有变化 注意在下面的编辑器里修改 JSON 配置后不会实时生效。 @@ -85,9 +87,7 @@ order: 47 "menubar": false, "height": 200, "plugins": [ - "advlist autolink lists link image charmap print preview anchor", - "searchreplace visualblocks code fullscreen", - "insertdatetime media table paste code help wordcount" + "advlist", "autolink", "link", "image", "lists", "charmap", "preview", "anchor", "pagebreak", "searchreplace", "wordcount", "visualblocks", "visualchars", "code", "fullscreen", "insertdatetime", "media", "nonbreaking", "table", "emoticons", "template", "help" ], "toolbar": "undo redo | formatselect | bold italic backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help" } @@ -102,11 +102,11 @@ order: 47 ```json { - "type": "input-rich-text", - "name": "rich", - "options": { - "content_css": "/xxx.css" - } + "type": "input-rich-text", + "name": "rich", + "options": { + "content_css": "/xxx.css" + } } ``` @@ -114,14 +114,15 @@ order: 47 ```css .mce-item-table th { - font-weight: bold; + font-weight: bold; } -.mce-item-table th, .mce-item-table td { - padding: 6px 13px; - border: 1px solid #ddd; +.mce-item-table th, +.mce-item-table td { + padding: 6px 13px; + border: 1px solid #ddd; } .mce-item-table tr { - border-top: 1px solid #ccc; + border-top: 1px solid #ccc; } ``` @@ -129,14 +130,15 @@ order: 47 ```css table th { - font-weight: bold; + font-weight: bold; } -table th, table td { - padding: 6px 13px; - border: 1px solid #ddd; +table th, +table td { + padding: 6px 13px; + border: 1px solid #ddd; } table tr { - border-top: 1px solid #ccc; + border-top: 1px solid #ccc; } ``` diff --git a/package.json b/package.json index 100c0123a..2f922da1b 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ }, "devDependencies": { "@types/jest": "^28.1.0", + "echarts": "5.3.3", "fis-optimizer-terser": "^1.0.1", "fis-parser-sass": "^1.1.1", "fis-parser-svgr": "^1.0.0", @@ -47,7 +48,10 @@ "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.0", "lerna": "^5.0.0", - "ts-jest": "^28.0.3" + "react": "^18.2.0", + "react-dom": "^18.2.0", + "ts-jest": "^28.0.3", + "zrender": "^5.3.2" }, "jest": { "verbose": true, diff --git a/packages/amis-core/package.json b/packages/amis-core/package.json index f6c037768..cdea17054 100644 --- a/packages/amis-core/package.json +++ b/packages/amis-core/package.json @@ -21,8 +21,8 @@ "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.0", "moment-timezone": "^0.5.34", - "react": "^18.0.0", - "react-dom": "^18.0.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", "rimraf": "^3.0.2", "rollup": "^2.73.0", "rollup-plugin-auto-external": "^2.0.0", @@ -52,7 +52,7 @@ "mobx": "^4.5.0", "mobx-react": "^6.3.1", "mobx-state-tree": "^3.17.3", - "moment": "^2.19.3", + "moment": "^2.19.4", "papaparse": "^5.3.0", "qs": "6.9.7", "react-json-view": "1.21.3", diff --git a/packages/amis-formula/package.json b/packages/amis-formula/package.json index e16e1f687..d0dddd0c7 100644 --- a/packages/amis-formula/package.json +++ b/packages/amis-formula/package.json @@ -35,7 +35,7 @@ "homepage": "https://github.com/aisuda/amis-tpl#readme", "dependencies": { "lodash": "^4.17.15", - "moment": "^2.29.1", + "moment": "^2.29.4", "tslib": "^2.3.1" }, "devDependencies": { @@ -56,7 +56,7 @@ "rollup": "^2.60.2", "rollup-plugin-license": "^2.6.0", "rollup-plugin-terser": "^7.0.2", - "sass": "^1.36.0", + "sass": "^1.54.0", "sass-loader": "^12.1.0", "style-loader": "^3.2.1", "stylelint": "^13.0.0", diff --git a/packages/amis-ui/package.json b/packages/amis-ui/package.json index 1de27a218..134a31a81 100644 --- a/packages/amis-ui/package.json +++ b/packages/amis-ui/package.json @@ -38,7 +38,7 @@ "classnames": "2.3.1", "codemirror": "^5.63.0", "downshift": "6.1.7", - "echarts": "5.3.1", + "echarts": "5.3.3", "froala-editor": "3.1.1", "hoist-non-react-statics": "^3.3.2", "jsbarcode": "^3.11.5", @@ -50,7 +50,7 @@ "mobx": "^4.5.0", "mobx-react": "^6.3.1", "mobx-state-tree": "^3.17.3", - "moment": "^2.19.3", + "moment": "^2.19.4", "monaco-editor": "0.30.1", "prop-types": "^15.6.1", "rc-input-number": "^7.3.4", @@ -63,7 +63,7 @@ "react-transition-group": "4.4.2", "react-visibility-sensor": "5.1.1", "sortablejs": "1.14.0", - "tinymce": "^5.10.3", + "tinymce": "^6.1.2", "tslib": "^2.3.1", "uncontrollable": "7.2.1" }, @@ -83,15 +83,15 @@ "jest-environment-jsdom": "^28.1.0", "moment-timezone": "^0.5.34", "postcss-import": "^14.1.0", - "react": "^18.0.0", - "react-dom": "^18.0.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", "rimraf": "^3.0.2", "rollup": "^2.73.0", "rollup-plugin-auto-external": "^2.0.0", "rollup-plugin-license": "^2.7.0", "rollup-plugin-postcss": "^4.0.2", "rollup-plugin-scss": "^3.0.0", - "sass": "^1.52.1", + "sass": "^1.54.0", "ts-jest": "^28.0.3", "typescript": "^4.6.4" }, diff --git a/packages/amis-ui/src/components/Tinymce.tsx b/packages/amis-ui/src/components/Tinymce.tsx index 92b427366..5536cc18b 100644 --- a/packages/amis-ui/src/components/Tinymce.tsx +++ b/packages/amis-ui/src/components/Tinymce.tsx @@ -6,6 +6,8 @@ import tinymce from 'tinymce/tinymce'; // A theme is also required import 'tinymce/icons/default/index'; import 'tinymce/themes/silver'; + +import 'tinymce/models/dom/model'; // import 'tinymce/skins/ui/oxide/skin.css'; // Any plugins you want to use has to be imported @@ -15,7 +17,6 @@ import 'tinymce/plugins/lists'; import 'tinymce/plugins/link'; import 'tinymce/plugins/image'; import 'tinymce/plugins/charmap'; -import 'tinymce/plugins/print'; import 'tinymce/plugins/preview'; import 'tinymce/plugins/anchor'; import 'tinymce/plugins/searchreplace'; @@ -25,10 +26,8 @@ import 'tinymce/plugins/fullscreen'; import 'tinymce/plugins/insertdatetime'; import 'tinymce/plugins/media'; import 'tinymce/plugins/table'; -import 'tinymce/plugins/paste'; import 'tinymce/plugins/help'; import 'tinymce/plugins/wordcount'; -import 'tinymce/plugins/hr'; import 'tinymce/plugins/pagebreak'; import 'tinymce/plugins/visualchars'; import 'tinymce/plugins/template'; @@ -67,15 +66,35 @@ export default class TinymceEditor extends React.Component { content_css: false, height: 400, language: !locale || locale === 'zh-CN' ? 'zh_CN' : 'en', + branding: false, plugins: [ - 'advlist autolink link image lists charmap print preview hr anchor pagebreak', - 'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking', - 'table emoticons template paste help' + 'advlist', + 'autolink', + 'link', + 'image', + 'lists', + 'charmap', + 'preview', + 'anchor', + 'pagebreak', + 'searchreplace', + 'wordcount', + 'visualblocks', + 'visualchars', + 'code', + 'fullscreen', + 'insertdatetime', + 'media', + 'nonbreaking', + 'table', + 'emoticons', + 'template', + 'help' ], toolbar: - 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | ' + - 'bullist numlist outdent indent | link image | print preview media fullpage | ' + - 'forecolor backcolor emoticons | help', + 'undo redo | blocks | bold italic | alignleft aligncenter alignright alignjustify | ' + + 'bullist numlist outdent indent | link image | preview media | ' + + 'fontfamily fontsize forecolor backcolor emoticons | print help', menu: { file: { title: 'File', @@ -98,7 +117,7 @@ export default class TinymceEditor extends React.Component { format: { title: 'Format', items: - 'bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align | forecolor backcolor | removeformat' + 'bold italic underline strikethrough superscript subscript codeformat | styles blocks fontsize align | forecolor backcolor | removeformat' }, tools: { title: 'Tools', diff --git a/packages/amis/package.json b/packages/amis/package.json index 5ace5d8e9..e9ef9d65c 100644 --- a/packages/amis/package.json +++ b/packages/amis/package.json @@ -47,7 +47,7 @@ "blueimp-canvastoblob": "2.1.0", "classnames": "2.3.1", "downshift": "6.1.7", - "echarts": "5.3.1", + "echarts": "5.3.3", "echarts-stat": "^1.2.0", "exceljs": "^4.3.0", "file-saver": "^2.0.2", @@ -62,11 +62,11 @@ "mobx": "^4.5.0", "mobx-react": "^6.3.1", "mobx-state-tree": "^3.17.3", - "moment": "^2.19.3", + "moment": "^2.19.4", "monaco-editor": "0.30.1", "mpegts.js": "^1.6.10", "prop-types": "^15.6.1", - "qrcode.react": "^3.0.0", + "qrcode.react": "^3.1.0", "rc-overflow": "^1.2.4", "react-cropper": "^2.1.8", "react-dropzone": "^11.4.2", @@ -111,7 +111,7 @@ "@types/tinymce": "^4.5.24", "axios": "0.25.0", "bce-sdk-js": "^0.2.9", - "concurrently": "^7.0.0", + "concurrently": "^7.3.0", "copy-to-clipboard": "3.3.1", "core-js": "^3.21.0", "css": "3.0.0", @@ -135,8 +135,8 @@ "prettier": "^2.6.1", "pretty-quick": "^3.1.1", "prismjs": "^1.25.0", - "react": "^18.0.0", - "react-dom": "^18.0.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", "react-router": "5.2.1", "react-router-dom": "5.3.0", "react-test-renderer": "^18.0.0",