WSYWIG editors are sometimes a necessity in our development lives. Using TinyMce is actually very easy.
In order to start using TinyMce we need to install the dependency. There is an npm module for tinymce.
Creating the component is actually pretty straight forward. The two key components to pay attention to is the after view init and the destroy.
You need to make sure that you initialize the tinymce editor and tear it down.
Copy theme assets from node_modules to the assets directory.
The component itself can hook into the elementRef in our display HTML file.
Then we can set the innerHTML of our nativeElement to the content from our wyswig element.
If you want to show the dom from the wysiwig editor you can use a WebView tag and put the dom as the src for the tag. Make sure that you set a height attribute if have the element in a StackLayout as without it the WebView item has no height.