This is a migrated thread and some comments may be shown as answers.

editor.pasteHtml is inserting <STRONG> tag before Paragraph

1 Answer 43 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Chinnayya Yaragattimath
Top achievements
Rank 1
Chinnayya Yaragattimath asked on 18 Feb 2010, 01:39 PM
Hi,

I want to set styles to Paragaraph, I am able to set the styles but after setting style the selected paragraphs are becoming bold. Editor is adding <Strong> tag to the selected Paragraphs. Please tell me any work around for this, or is it issue in Editor when we do PasteHtml with P tags. This happens for P tags

My Code is as below:

var cssTextFormed = "text-align:"+textAlign+";line-height:"+lineSpace+";text-indent:"+hanging+"; margin: "+ beforePara+ " "+ rightindents +" "+ afterPara +" "+ leftindents +";";
   
var editor =$find("RadEditor1");
   
//if more than one paragrah is selected then replace p tag with applied style
var selection = editor.getSelectionHtml().replace(/<P/g,'<P style='+cssTextFormed);
editor.pasteHtml(selection);

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 22 Feb 2010, 03:28 PM
Hi Chinnayya,

The problem could be due to that you have not closed the quested after the cssTextFormed object. Please, close it and test again:var selection = editor.getSelectionHtml().replace(/<P/g,'<P style='+cssTextFormed');

If you still experience the problem, open a support ticket and send a fully working project along with sample content and steps demonstrating how to reproduce it.

Best regards,
Rumen
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Editor
Asked by
Chinnayya Yaragattimath
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or