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.
27 lines
716 B
27 lines
716 B
import loadScript from './loadScript'
|
|
import ELEMENT from 'element-ui'
|
|
|
|
let tinymceObj
|
|
|
|
export default function loadTinymce(cb) {
|
|
if (tinymceObj) {
|
|
cb(tinymceObj)
|
|
return
|
|
}
|
|
|
|
const loading = ELEMENT.Loading.service({
|
|
fullscreen: true,
|
|
lock: true,
|
|
text: '富文本资源加载中...',
|
|
spinner: 'el-icon-loading',
|
|
background: 'rgba(255, 255, 255, 0.5)'
|
|
})
|
|
|
|
// loadScript('https://lib.baomitu.com/tinymce/latest/tinymce.min.js', () => {
|
|
loadScript('http://lib.baomitu.com/tinymce/4.9.2/tinymce.min.js', () => {
|
|
loading.close()
|
|
// eslint-disable-next-line no-undef
|
|
tinymceObj = tinymce
|
|
cb(tinymceObj)
|
|
})
|
|
}
|
|
|