I'm trying to implement a solution with TinyMCE and JSF 2.x. I'm not sure however how to go on (different approaches).
What I'm trying to do...
Create user templates (Facelets files) with specific editable areas/sections that someone can edit via TinyMCE after they've logged in.
I dont want to use DB to store the "editable" parts or insert them dynamiclly into the Facelets templates.
I was thinking sommething like this.
- Load the editable content into TinyMCE.
- User updates the content.
- On submit, validate the content with Java API for XML Processing or some other xml/xhtml parser.
- Read the Facelets template and replace the editable content with the submited one.
- Replace the old Facelets file with the new one and save it.
Should I use a middle step to pre save the submited content into a Facelets file before I do the change? Any other ideas on how to go on with this would be appreciated!