View in DocumentEditor
Web Layout
DocumentEditor allows to change the view to web layout and print using the layoutType
property with the supported LayoutType
<ejs-documenteditor id="container" layoutType="Continuous"></ejs-documenteditor>
Ruler
Using ruler we can refer to setting specific margins, tab stops, or indentations within a document to ensure consistent formatting in Document Editor.
The following example illustrates how to enable ruler in Document Editor
<ejs-button id="container_ruler_button" content="Show/hide ruler" onclick="onClick()"></ejs-button>
<ejs-documenteditor id="container">
<ejs-documenteditorcontainerevent (created)="onCreate()" documentEditorSettings="settings" isReadOnly=false></ejs-documenteditorcontainerevent>
</ejs-documenteditor>
<script>
var container;
var settings = { showRuler: true };
function onCreate() {
var documenteditorElement = document.getElementById("container");
container = documenteditorElement.ej2_instances[0];
container.enableAllModules();
}
function onClick() {
container.documentEditorSettings.showRuler = !container.documentEditorSettings.showRuler;
}
</script>
public ActionResult Default()
{
return View();
}
Navigation Pane
Using the heading navigation pane allows users to swiftly navigate documents by heading, enhancing their ability to move through the document efficiently.
The following example illustrates how to enable heading navigation pane in Document Editor
<ejs-documenteditor id="container">
<ejs-documenteditorcontainerevent (created)="onCreate()" documentEditorSettings="settings" isReadOnly=false></ejs-documenteditorcontainerevent>
</ejs-documenteditor>
<script>
var container;
var settings = { showNavigationPane: true };
function onCreate() {
var documenteditorElement = document.getElementById("container");
container = documenteditorElement.ej2_instances[0];
container.enableAllModules();
}
</script>
public ActionResult Default()
{
return View();
}