I have an existing site (I didn’t build it) that uses tinyMCE. I’m trying to avoid having to rip it out and go with something else, so I figured I’d try and see if anyone has done this before.
Overview:
The page in the app is to edit questions for a quiz/assignment. 99% of the questions are pretty standard stuff: textboxes, textareas, etc. However, the left over stuff, needs to have canvas. A nifty little graphing utility was written for these assignments, but whenever there is something with a <canvas> tag, we need to edit the data in the database manually.
The Question:
Is there a way to tell TinyMCE to allow the <canvas> tag to just be there when saving and NOT be removed? I don’t necessarily want TinyMCE to do anything to the tag, I just want it left there so we don’t have to edit the database every time someone wants one the values changed.
This can be easily done using the tinymce configuration.
Check out the settings valid_elements and valid_children.
you will need to add
canvasto the valid_elemnts and define valid children using thevalid_childrensetting.