Is this possible to limit the HTML only to Bold, Italic, Underline and Breaks in jHTMLArea plugin editor? I'm mostly interested in stripping P tags and using two breaks instead. What I have done in the mean time is:
$.fn.stripPTags = function(_str) {
_str = _str.replace('<p></p>', '');
_str = _str.replace('<p>', '');
_str = _str.replace('</p>', '<br /><br/ >');
return _str;
}
and:
$(document).ready(function(){
$('#txtDefaultHtmlArea_Save').click(function(){
var _str = $.fn.stripPTags( $('#txtDefaultHtmlArea').htmlarea('toHtmlString') );
return false;
}); });