how to use RTE to show HTML content pulled from db column. once user make changes, get updated HTML and store it back to the DB.
I have HTML content stored in db column. This HTML contains few paragraphs. my requirements is to pull the HTML from db and show it to the user on UI. User should be able to edit the paragraphs or can add new ones. Once user submit i will need to store the HTML of updated text back to the db.
I only know to fetch the data and save it back to db. but how will i show user that content and allow them to edit it and most importantly get the updated HTML ?
I am reading about Rich Text Editor but never used it.
When you source the RTE with a text property and let the user enter any data and format it (like bold, italic, font, color, etc) and save it. The property would hold the HTML text only.
So, before you load the section showing the RTE on UI, fetch the data from DB (in preprocessing actions) and set it into the property that you are going to source the RTE with. It should be automatically rendered in the expected format for the users to modify. When you RTE is editable, user will be able to edit the data and on submit, updated data will be available on clipboard for you to save.If you are using custom button to save, make sure you refresh the section and then save as refresh will get you updated HTML.