Restricting the Editor

1 Answer 53 Views
Editor
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Veteran
DoomerDGR8 asked on 01 Aug 2021, 08:59 AM

I'm trying to make the Editor a bit restricted for my users on specific pages. I have the following requirements:

  • Only a specific font be applied from the get-go. No font selection
  • Prevent pasting of other fonts
  • Have only one font in the font combo
    • Allow a default style of Ariel, 8 for normal text
    • Allow two types of headings
    • Allow Bold, Italic and underline style

Is it possible to lock it down?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 04 Aug 2021, 02:52 PM

Hello Hassan,

Here are the currently available options for the described use case:

  • To apply default font styles to the regular (normal) text content, you will need a DIV edit mode, so that the editable content is part of the page and you can control its appearance with CSS. An alternative approach for the IFRAME mode would be to apply font styles programmatically on initial load.
  • You can explicitly list only the tools that you want to appear in the toolbar.
  • To limit the available font names or headings, you can customize the items in the toolbar dropdowns (font size, font name, format).
  • The tricky part is to prevent pasting of other fonts, because these fonts can be applied in different ways. The Editor supports cleaning up of pasted content and this works with attributes and tags. If the undesired font style is applied with an inline style, you can filter it out if you strip the style attribute, which may remove other styles too.

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Editor
Asked by
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Dimo
Telerik team
Share this question
or