Skip to content

Commit 8799b46

Browse files
fix
1 parent 17707dd commit 8799b46

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

components/wysiwyg-editor.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,8 @@ class WYSIWYGEditor extends LitElement {
5353
const editor = this.renderRoot.querySelector('#editor')
5454
console.log("firstUpdated() editor ", editor)
5555

56-
if (this.content) {
57-
editor.innerHTML = this.content
58-
}
59-
6056
editor.addEventListener('paste', (e) => {
6157
e.preventDefault();
62-
6358
console.log("pasing: ", e);
6459

6560
let text = e.clipboardData.getData('text/plain');
@@ -70,7 +65,7 @@ class WYSIWYGEditor extends LitElement {
7065
updated(changedProperties) {
7166
console.log("updated()", changedProperties);
7267

73-
if (changedProperties.has('content')) {
68+
if (!changedProperties.get('content')) {
7469
const editor = this.renderRoot.querySelector('#editor')
7570
editor.innerHTML = this.content || ""
7671
}

0 commit comments

Comments
 (0)