Simple custom tag

2 posts, 0 answers
  1. dj
    dj avatar
    3 posts
    Member since:
    Feb 2008

    Posted 29 May 2008 Link to this post


    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,

  2. Rumen
    Rumen avatar
    13274 posts

    Posted 02 Jun 2008 Link to this post

    Hi dj,

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

    Best regards,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top