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

Custom Content Filter for Design Mode

1 Answer 41 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Dhanika
Top achievements
Rank 1
Dhanika asked on 25 Nov 2008, 08:57 PM
Hello,

I was wondering if there is a possibility of creating a custom content filter for the editor so that in design mode none of the elements added to the content will be allowed to be resized or moved (the resize handles etc.. are stripped out)?

If there is anyone who could point me in the right direction that would be helpful.

As an example, if I insert a div into the content (in design mode) I want to prevent the resize handles from showing.

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 26 Nov 2008, 03:17 PM
Hello Dhanika,

You should make sure that all elements in RadEditor has applied unselectable="on" which will prevent their selection:

<div unselectable="on">test</div>

       var elements = editor.get_document().getElementsByTagName("*");  
        for (i=0; i<elements.length; i++)
        {
           var element = elements[i];
           element.setAttribute("unselectable", "on");
        }

Kind regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Dhanika
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or