Currently, I am utilizing Bootstrap's rich text editor by this method $('#editor').wysiwyg();
.
Utilizing AJAX, I am passing the HTML content created by .wysiwyg to save it in the database. Later on, I plan to retrieve the saved HTML data to display on my homepage. However, I am facing an obstacle where I wish to display a preview of the text and images inserted before revealing the full html content once the user clicks "see more". The preview should include:
https://i.sstatic.net/UcFd1.png
Upon clicking "see more", the complete html data generated by wysiwig will be shown. Essentially, the preview section should only comprise plain text without any formatting, complemented by the attached images.
My current workaround involves directly accessing the html produced by Bootstrap and extracting the value from the textbox. Is there a more efficient approach?