1
votes

I'm currently working with Kendo UI Editor and having some issues trying to get the current font style. Basically, what I would like to do is get the following values using Javascript or jQuery:

Values I want to get:

enter image description here

Also(and if possible), I would like to get the other styles that could be activated such as Bold, italic, underline, etc. Any ideas how can I achieve this?

Thanks in advance! Best regards.

1

1 Answers

2
votes

Try the following:

$(".k-editor").find(".k-fontName").val();
$(".k-editor").find(".k-fontSize").val();

EDIT:
To make sure Bold, Italic, Underline is checked:

$(".k-editor").find(".k-tool").filter("[title='Bold']").hasClass("k-state-selected");
$(".k-editor").find(".k-tool").filter("[title='Italic']").hasClass("k-state-selected");
$(".k-editor").find(".k-tool").filter("[title='Underline']").hasClass("k-state-selected");