Adding new paragraph, new line and new list item

How can I add new paragraph, add new line and add new list item by code to then DocumentEditor?

Something like this:

this.$refs.documenteditor.ej2Instances.editor.insertParagraph();
or
this.$refs.documenteditor.ej2Instances.editor.insertNewLine();


1 Reply

HC Harini Chellappa Syncfusion Team March 9, 2020 10:07 AM UTC

Hi Mariusz, 

Thank you for contacting Syncfusion Support. 

Currently, document editor doesn’t provide any API to add paragraphs and new lines. As a workaround you can achieve. Please find the details below. 

To insert paragraph with some text, you can use insertText API of editor module. 

Sample code snippet 

this.$refs.documenteditor.ej2Instances.editor.insertText(“Hello world”) 
 
Can you please share the use case scenario in detail? We will provide possible solution accordingly. 

Regards, 
Harini C 


Loader.
Up arrow icon