Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onCtrlSSave(){
// vm.$Message.info("正在保存中");
if(this.loading) return;
let content = tinymce.get('tinymceEditer').getContent();
let contentArr = content.split("<p></p>");
let i = 0, length = contentArr.length;
content = "";
for(i; i")[1] :'';
} else {
content += value ? value.split("<p>")[1] + "<br>" : '';
}
}
let obj = {
params: {
container: content,
catalogId:this.params.catalogId,</p>
initTinymce () {
if(tinymce.get('tinymceEditer')) {
// if(this.container){
this.loading = false;
let tinymceDom = tinymce.get('tinymceEditer').dom.doc;
tinymceDom.documentElement.scrollTop = tinymceDom.body.scrollTop = 0;
tinymce.get('tinymceEditer').setContent(this.container);
// }
} else {
this.$nextTick(() => {
let vm = this;
let height = document.body.offsetHeight - 300;
tinymce.init({
selector: '#tinymceEditer',
branding: false,
elementpath: false,
height: height,
language: 'zh_CN.GB2312',
destroyed() {
if (tinymce.get(this.id)) {
tinymce.get(this.id).destroy()
}
}
}
beforeDestroy() {
tinymce.get('tinymceEditer') && tinymce.get('tinymceEditer').destroy();
},
destroyed () {
destroyed() {
if (tinymce.get(this.id)) {
tinymce.get(this.id).destroy()
}
}
}
removeWysiwyg (state) {
removeTinyMCEInstance(tinymce.get(state.id));
this.setState({ wysiwygActive: false });
},