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

[Solved] editor.pasteHtml

1 Answer 158 Views
Grid
This is a migrated thread and some comments may be shown as answers.
HHH
Top achievements
Rank 1
HHH asked on 24 Mar 2008, 03:37 PM

Hi,There

I m using Prometheus RadEditor and I m trying to Paste the Text from CustomDialogBox..But problem is it  add extra space at the end
for E.G

Should work like this:

ABCDEG Paste Text HIJKLM

Result:

ABCDEG
Paste Text
HIJKLM


I have  referred below link
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Editor/Examples/CustomDialogs/DefaultCS.aspx

IF i use     editor.PasteHtml(args.questionText);      this line of code its working perfect   but i use

editor.PasteHtml("<div overflow=\"auto\" class=\"BmiNonEditable\">" + args.questionText +"</div>");

it didn't paste the text on right spot.. and i really want to use this DIV tag..
cuz i m applying style to paste text and didn't allow to change the paste text (only formatting is allowed)

And My Class Style has nothing in it.

<

style type="text/css">

.BmiNonEditable{}

</style>

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 27 Mar 2008, 05:17 PM
Hi,

The observed behavior is a browser related and it is due to the fact that the DIV element is a block element. If you would like to avoid the paragraph tag insertion you should replace the DIV with SPAN tag, e.g.

editor.pasteHtml("<span overflow=\"auto\" class=\"BmiNonEditable\">" + args.questionText +"</span>");

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
HHH
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or