魏超 hace 5 años
padre
commit
279d7eb1dc
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2
    0
      src/components/Wangedit/Wangedit.jsx

+ 2
- 0
src/components/Wangedit/Wangedit.jsx Ver fichero

@@ -11,6 +11,7 @@ class Wangedit extends React.Component {
11 11
     super(props, context);
12 12
     this.state = {
13 13
       html: undefined,
14
+      contenteditable: props.contenteditable == false ? false : true
14 15
     }
15 16
     this.editor = undefined;
16 17
   }
@@ -77,6 +78,7 @@ class Wangedit extends React.Component {
77 78
     }
78 79
 
79 80
     this.editor.create()
81
+    this.editor.$textElem.attr('contenteditable',this.state.contenteditable);
80 82
     this.editor.customConfig.uploadImgShowBase64 = true
81 83
     this.editor.txt.html(this.props.value)
82 84
   }