diff --git a/frontend/src/components/canvas/custom-component/DeRichTextView.vue b/frontend/src/components/canvas/custom-component/DeRichTextView.vue index ebee3834ad..17ad238e19 100644 --- a/frontend/src/components/canvas/custom-component/DeRichTextView.vue +++ b/frontend/src/components/canvas/custom-component/DeRichTextView.vue @@ -131,9 +131,9 @@ export default { viewInit(){ bus.$on('fieldSelect-' + this.element.propValue.viewId, this.fieldSelect) tinymce.init({}) - this.myValue = this.assignment(this.element.propValue.textValue) - bus.$on('initCurFields-' + this.element.id, this.initCurFieldsChange) this.$nextTick(()=>{ + this.myValue = this.assignment(this.element.propValue.textValue) + bus.$on('initCurFields-' + this.element.id, this.initCurFieldsChange) this.initReady=true }) }, @@ -170,19 +170,21 @@ export default { }, resetSelect(node){ const edInner = tinymce.get(this.tinymceId); - const nodeArray = edInner.dom.select(".base-selected") - if(nodeArray){ - nodeArray.forEach(nodeInner=>{ - nodeInner.removeAttribute('class') - }) - } - if(node){ - const pNode = node.parentElement - if(pNode && pNode.id&& pNode.id.indexOf('changeText')>-1){ - const innerId = '#'+pNode.id - const domTest = edInner.dom.select(innerId)[0] - domTest.setAttribute("class",'base-selected') - edInner.selection.select(domTest) + if(edInner.dom){ + const nodeArray = edInner.dom.select(".base-selected") + if(nodeArray){ + nodeArray.forEach(nodeInner=>{ + nodeInner.removeAttribute('class') + }) + } + if(node){ + const pNode = node.parentElement + if(pNode && pNode.id&& pNode.id.indexOf('changeText')>-1){ + const innerId = '#'+pNode.id + const domTest = edInner.dom.select(innerId)[0] + domTest.setAttribute("class",'base-selected') + edInner.selection.select(domTest) + } } } }, diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 2535f605f7..60be253b72 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -1399,7 +1399,6 @@ export default { } .this_mobile_canvas_cell { - text-align: center; height: 100%; display: flex; align-items: center;