I've got an HTMLEditor and I need:
1. to save data in text format by setValue() function (without tags HTML and the tag <br> must be converted in #13)
2. read the text data by getValue() function and transform the text in HTML
Thanks!
Printable View
I've got an HTMLEditor and I need:
1. to save data in text format by setValue() function (without tags HTML and the tag <br> must be converted in #13)
2. read the text data by getValue() function and transform the text in HTML
Thanks!
You can use RegExp to replace tags.
Hi nicolabaldo,
you can use regex to replace the html tag like this.
Ext.util.Format.stripTags(yourhtmleditor.ed.getContent({format: 'raw' }).replace(/<\/?p+>/gi, ' '))
It will remove all html tag and also replace <p> tag with space.
Ok thanks!