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

Set default formatting

3 Answers 477 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Arik
Top achievements
Rank 1
Arik asked on 14 Jan 2018, 03:45 PM

I'm using the Kendo Editor for Angular JS.
I want to set the default Formatting tool value to be Paragraph when the editor is loaded.
Is there a way to do that?

Other than that, in the thread https://www.telerik.com/forums/clean-the-paragraph-format it says that "The Paragraph format option is the default structural markup option", but when only a single-line text is entered with no formatting, the <p> tags are not added to it.
for example in http://dojo.telerik.com/aCUke , if the character 'a' is written in the editor and the focus is removed, the value is saved as only 'a' and not '<p>a</p>'.

Is this the editor's behavior by design? Or is it a bug?

Thanks,
Arik

3 Answers, 1 is accepted

Sort by
0
Arik
Top achievements
Rank 1
answered on 14 Jan 2018, 03:51 PM
0
Arik
Top achievements
Rank 1
answered on 14 Jan 2018, 03:52 PM
0
Ivan Danchev
Telerik team
answered on 16 Jan 2018, 03:33 PM
Hello Arik,

This behavior is by design. Paragraph is the default markup option but it is triggered after pressing Enter. As a workaround you can set an empty paragraph in the Editor, which will trigger the Paragraph option even on entering a single character:
<textarea kendo-editor k-ng-model="html">
  <p></p>
</textarea>

Modified dojo.

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Editor
Asked by
Arik
Top achievements
Rank 1
Answers by
Arik
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or