I've constructed a simple, light-weight WYSIWYG HTML editor with the use of contentEditable="true", inserting HTML tags via javascript.
It all works great, except I don't know the best way to submit, validate, and insert the input into the database. I'm concerned that someone might insert their own tags and mess up the output.
My best idea so far is to convert all valid tags into BBCode with PHP just before inserting the input into the batabase, and then clear all the other tags. Is this conventional?
Thank you!