| | |
| | | editor: null |
| | | } |
| | | }, |
| | | props:['getMyBody'], |
| | | mounted() { |
| | | this.editor = new E('#edit'); |
| | | this.editor.config.height = 450; |
| | |
| | | '#4b9bb7', |
| | | '#09152f' |
| | | ] |
| | | this.editor.create(); |
| | | |
| | | this.editor.config.onchange = (html)=>{ |
| | | // 第二步,监控变化,同步更新到 textarea |
| | | this.$emit('getMyBody', html); |
| | | } |
| | | this.editor.create(); |
| | | }, |
| | | beforeDestroy() { |
| | | this.editor.destroy(); |
| | |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | #edit{ |
| | | :deep(.w-e-toolbar){ |
| | | background-color: #09152f !important; |
| | | color: #4b9bb7; |
| | | } |
| | | :deep(.w-e-text-container){ |
| | | background-color: #09152f !important; |
| | | color: #4b9bb7; |
| | | } |
| | | #edit { |
| | | :deep(.w-e-toolbar) { |
| | | background-color: #09152f !important; |
| | | color: #4b9bb7; |
| | | } |
| | | |
| | | :deep(.w-e-text-container) { |
| | | background-color: #09152f !important; |
| | | color: #4b9bb7; |
| | | } |
| | | } |
| | | </style> |