I have two different elements, one is a content-editable DIV as a directive where you can enter some HTML such as img tags and it will render automatically on keypress.
Secondly I have a textarea which is bound to an ng-model and there I also want users to be able type HTML mainly img tags so it renders automatically however, I can't figure out if this is possible, if users type tag then it saved as is.
What is the best solution to achieve what I want on the textarea? Do I have to make a directie or is there a more simple solution where I can leverage the ng-model variable that it is bound to.
Final question, are there any security implications I need to be worried about so I handle input safely? I.e. I do not want people to put script tags in there, just img tags, links and maybe some formatting HTML. I use $santize service for the directive doing $sanitize(htmlContent) before rendering.