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

Simple custom tag

1 Answer 62 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
dj
Top achievements
Rank 1
dj asked on 29 May 2008, 08:29 AM
Hello,

I am trying to implement a very simple functionality, allowing me to insert a custom html tag, for example like this
<span class="myClass"></span> 
Unfortunately, when I am using editor.PasteHtml method, the cursor after calling that method is placed after the closing tag, so the text entered is not formatted as I would wish it. This only happens when I am not selecting any existing text. If I do, I used the "apply css class" method in order to perform desired operation.

I would like simply to use the functionality of, for example, the Bold-Tool, which inserts <strong> tag, and then the text is formatted bold. Just instead "strong", I'd like to use my custom tag with attribute.
Perhaps I missed something, but I would appreciate your help.

Thanks in advance,
Lukasz

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 02 Jun 2008, 04:23 PM
Hi dj,

I believe that the following two methods from the RadEditor's API will be helpful for your scenario:
GetHtmlText
and
GetParentElement

Best regards,
Rumen
the Telerik team

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