SQL injection should be something you are worried about in your data layer and not in your interface. If you use proper methods to prevent SQL injection when inserting data into your database, you donโt have to worry about doing anything with TinyMCE or any other part of your front-end code.
Cross-site scripting attributes, on the other hand, are a completely different story. The best strategy for preventing cross-site scripting attacks is usually HTML coding for anything you donโt create in your interface. However, since you are using TinyMCE, I assume that you want to allow user-generated HTML code on your site. In this case, you need to find "HTML Sanitizing."
Here are some links to get started:
You can decide whether you prefer to misinform HTML before storing it in the database, after extracting both from the database. There are pros and cons to each strategy.
source share