Topic: WYSIWYG Plugin getCode how to

conguero23 free asked 3 years ago


Expected behavior Retrieve html from editor Actual behavior No documentation on hot to. Resources (screenshots, code snippets etc.)


Mikołaj Smoleński staff commented 3 years ago

To get the code from WYSIWYG you will need to access the component by $ref. Here's an example:

<MDBWysiwyg ref="wysiwygRef" />

setup() {
 const wysiwygRef = ref(null);
 const code = ref(null);

 onMounted(() => {
   code.value = wysiwygRef.value.getCode();
   console.log(code.value);
 }

  return {
    wysiwygRef
  }
}

Keep coding,  Mikołaj from MDB



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: MDB5 1.4.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No