react-native-zss-rich-text-editor
react-native-zss-rich-text-editor copied to clipboard
How to get HTML content
Hi noob question but how do i actually get the HTML content, i have an onPress, but when i try to alert out the content it just gives me the content from when the editor was initialised.
onPressLearnMore(){ alert(titleHtml + ' ' + contentHtml) }
Hi,
Make a separate function for that say :
async getHTML() { const contentHtml = await this.richtext.getContentHtml(); return contentHtml }
Now invoke it on onPress.
this.richtext.getContentHtml().then((htmlContent)=>{you can get it here})