综合办公系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

loadTinymce.js 618B

1234567891011121314151617181920212223242526272829
  1. import loadScript from './loadScript'
  2. import ELEMENT from 'element-ui'
  3. import pluginsConfig from './pluginsConfig'
  4. let tinymceObj
  5. export default function loadTinymce(cb) {
  6. const { tinymceUrl } = pluginsConfig
  7. if (tinymceObj) {
  8. cb(tinymceObj)
  9. return
  10. }
  11. const loading = ELEMENT.Loading.service({
  12. fullscreen: true,
  13. lock: true,
  14. text: '富文本资源加载中...',
  15. spinner: 'el-icon-loading',
  16. background: 'rgba(255, 255, 255, 0.5)'
  17. })
  18. loadScript(tinymceUrl, () => {
  19. loading.close()
  20. // eslint-disable-next-line no-undef
  21. tinymceObj = tinymce
  22. cb(tinymceObj)
  23. })
  24. }