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

Default content style for Editor

4 Answers 349 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Nikita
Top achievements
Rank 1
Iron
Nikita asked on 07 Jan 2020, 04:02 PM
I'm using a Kendo Editor in TextArea mode, is there a way I can configure the styles (font, size, color) it applies to the content by default?

4 Answers, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 09 Jan 2020, 12:08 PM

Hi Nikita,

Please check this Dojo example that demonstrates how we can implement the desired functionality using the exec method.

Another approach that could be used is discussed in this How could I ensure the default font size? thread. Using the same as the demonstrated approach, we can set font and color for the text inside the Editor. 

I hope the provided information resolves the issue in the application you are working on.

Regards,
Petar
Progress Telerik

Get quickly onboarded and successful with your Telerik UI for ASP.NET MVC with the dedicated Virtual Classroom technical training, available to all active customers.
0
Nikita
Top achievements
Rank 1
Iron
answered on 09 Jan 2020, 04:33 PM

Hi Petar, thank you for your reply. That's not quite what I'm looking for. exec method inserts a span element with font and size applied to the content, meaning it becomes part of the content. I want to keep font and size (inherited) as it is selected in the picker tools. I just want it to show up in the editor with a different font, color and size by default - in my case its Roboto font, with gray color. Looks like the default editor style is black color with Verdana font and 12px size. I see these styles are defined in the header of the editor content document inside the iframe.

hope this makes sense.

0
Nikita
Top achievements
Rank 1
Iron
answered on 09 Jan 2020, 05:00 PM
I was able to do that by adding a stylesheet to the editor with a defined body style. So problem solved.
0
Petar
Telerik team
answered on 10 Jan 2020, 08:51 AM

Hi Nikita,

Thank you for the clarification on the functionality you wanted to achieve. I am happy to hear that you've managed to resolve the case. 

The solution you've mentioned is a valid one. Thank you for sharing it with the community! 

Regards,
Petar
Progress Telerik

Get quickly onboarded and successful with your Telerik UI for ASP.NET MVC with the dedicated Virtual Classroom technical training, available to all active customers.
Tags
Editor
Asked by
Nikita
Top achievements
Rank 1
Iron
Answers by
Petar
Telerik team
Nikita
Top achievements
Rank 1
Iron
Share this question
or