HI,
When I use the underline option from the toolbar it adds a html code like this one: "<span style="text-decoration: underline;">text</span>". I expected to see the html tag for underline: <u>
Why is doing that? In my particular case is affecting me because I don't allow "span" elements in the result text and then it's removing the added underline.
There is a possible solution for my case or should I replace <span> with <u> manually?
thanks
|
public OnClick(e) {
var value = this.replaceSpanToU(this.rteObj.getHtml());
alert(value);
}
public replaceSpanToU(input) {
return input.replace(
/\<span style\=\"text-decoration\: underline\;\"\>(.*?)\<\/span\>/g,
function(matched, index) {
return '<u>' + index + '</u>';
}
); } |
Hi syncfusion,
while saving a text from RTE, html tags are automatically added.
I'm also adding 1 snap for better understanding.
Caption
if you see here some <p> and <br> tags are added. How we can save text without html tags?
public BtnClick = (): void => { console.log(this.rteObj.getText()); }; |