Getting Started
5 Jul 20184 minutes to read
This section helps to understand the getting started of RTE control with the step-by-step instruction.
Initialize RTE Control
- To create Syncfusion Aurelia application refer [Aurelia Getting Started documentation](https://help.syncfusion.com/aurelia/overview#getting-started “”).
- Create
RTE
folder insidesrc/samples
location. - Create
RTE.html
file insidesrc/samples/rte
folder and use the below code for rendering RichTextEditor component
<template>
<div>
<textarea id="rteSample" rows="10" cols="30" ej-rte="e-width:100%" ></textarea>
</div>
</template>
- Create
rte.js
file insidesrc/samples/rte
folder with below code snippet.
export class DefaultFunctionalities { }
The following screenshot displays a RTE widget.
Toolbar–Configuration
You can configure a toolbar with the tools as your application requires.
<template>
<div>
<textarea id="rteSample" rows="10" cols="30" style="width: 740px; height: 440px" ej-rte="e-list.bind:list;e-tools.bind:tools"></textarea>
</div>
</template>
export class AllToolsRTE {
tool= {style: ["bold", "italic"], lists: ["unorderedList", "orderedList"],doAction: ["undo", "redo"],links: ["createLink"],images: ["image"] };
list = ["style", "lists", "doAction", "links", "images"];
constructor() {
this.list = this.list;
this.tools = this.tool;
}
}
The following screenshot displays a RTE widget.
Setting and Getting Content
You can set the content of the editor as follows.
<template>
<div>
<textarea id="rteSample" rows="10" cols="30" style="width: 740px; height: 440px" ej-rte="e-list.bind:list;e-tools.bind:tools">
<p><b>Description:</b></p>
<p>The Rich Text Editor (RTE) control is an easy to render in
client side. Customer easy to edit the contents and get the HTML content for
the displayed content. A rich text editor control provides users with a toolbar
that helps them to apply rich text formats to the text entered in the text
area. </p>
<p><b>Functional
Specifications/Requirements:</b></p>
<ol><li><p>Provide
the tool bar support, it’s also customizable.</p></li><li><p>Options
to get the HTML elements with styles.</p></li><li><p>Support
to insert image from a defined path.</p></li><li><p>Footer
elements and styles(tag / Element information , Action button (Upload, Cancel))</p></li><li><p>Re-size
the editor support. </p></li><li><p>Provide
efficient public methods and client side events.</p></li><li><p>Keyboard
navigation support.</p></li></ol>
</textarea>
</div>
</template>
export class AllToolsRTE {
tool= {style: ["bold", "italic"], lists: ["unorderedList", "orderedList"],doAction: ["undo", "redo"],links: ["createLink"],images: ["image"] };
list = ["style", "lists", "doAction", "links", "images"];
constructor() {
this.list = this.list;
this.tools = this.tool;
}
}
The following screenshot displays a RTE widget.