xxxxxxxxxx
1
<div class="wysiwyg" data-mdb-wysiwyg-init></div>
1
1
xxxxxxxxxx
1
const wysiwygElement = document.getElementsByClassName('wysiwyg')[0];
2
const wysiwygInstance = WYSIWYG.getInstance(wysiwygElement);
3
const content = document.getElementsByClassName('wysiwyg-content')[0]
4
5
content.innerHTML = `<p>Example content</p>`
6
content.dispatchEvent(new Event('input', { bubbles: true }));
Console errors: 0