Topic: Setting WYSIWYG Editor Content
smachesney free asked 2 years ago
I'd like to set the value of the editor on initialization. Right now, in the API, I see there is a method for getCode(), however I don't see one for example setCode().
How would I do this? I tried playing around with append html or setting innerHTML() but neither works. When I was using the old MDB4 jQuery version all I had to do was .val().
You just need to add the html you want to add to the WYSIWYG
<div class="wysiwyg" data-mdb-wysiwyg="wysiwyg"> <p>example code</p> <ul> <li>example list</li> <li>example list</li> </ul> </div>
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Free
- Premium support: No
- Technology: MDB Standard
- MDB Version: 3.2.0
- Device: desktop
- Browser: Chrome
- OS: windows
- Provided sample code: No
- Provided link: No