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

Strip functionality and addapt to css

1 Answer 49 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Tijs
Top achievements
Rank 1
Tijs asked on 09 Feb 2009, 01:42 PM
Hi,

We would like to use the Editor, but are concerned with our users messing up design and layout. We would therefor like to restrict the user to use most functionality in the editor and leave only:
- Lists
- Images
- Bold/Italic/Underscore
- H1/H2/H3
- Hyperlinks

None of these elements should be styled in any other way, so that we get simple plain html as a result. There should also be no way for the user to paste in any form of text that ignores these rules (for example, different font sizes from word).

Is this possible and how much work should we expect?

Thanks,
~Sph

1 Answer, 1 is accepted

Sort by
0
Paul
Top achievements
Rank 1
answered on 09 Feb 2009, 10:52 PM
I'm doing something similar. It's very simple to specify the available tools. As long as you don't make the html editing mode available, the only formatting a user can apply is with your selected tools. You can specify that any text pasted into the editor will have all formatting removed, and as long as that's ok, this is very simple and you should get exactly what you want since users only have the tools you specified.

In my case the client wants to allow pasting formatted text. Telerik has built-in filters that can remove all the font settings, and much of the undesired formatting, but not all of it. In this case, I've been working on a javaScript filter to remove the tags we don't want. There's a copy of the filter code in a post not far below yours, but I am not so comfortable about it being completely robust.
Tags
Editor
Asked by
Tijs
Top achievements
Rank 1
Answers by
Paul
Top achievements
Rank 1
Share this question
or