Getting Started with the Kendo UI for Angular Editor

This guide provides the information you need to start using the Kendo UI for Angular Editorit includes instructions about the available installation approaches, the required dependencies, the code for running the project, and links to additional resources.

The Editor Package is part of Kendo UI for Angular, a professional grade UI library with 100+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

After the completion of this guide, you will be able to achieve an end result as demonstrated in the following example.

Example
View Source
Edit In Stackblitz  
Change Theme:

Setting Up Your Angular Project

Before you start with the installation of any Kendo UI for Angular control, ensure that you have a running Angular project. The prerequisites to accomplish the installation of the components are always the same regardless of the Kendo UI for Angular package you want to use, and are fully described in the section on setting up your Angular project.

Installing the Component

You can choose to use either of the following two approaches for installing the Kendo UI for Angular package and the styles you want to apply:

Quick Setup with Angular CLI

The quick setup presents an automatic approach for adding packages with Angular CLI through the ng-add command. It is suitable for saving time and efforts as ng-add executes in a single step a set of otherwise individually needed commands.

To add the Kendo UI for Angular Editor package, run the following command:

ng add @progress/kendo-angular-editor

As a result, the ng-add command will perform the following actions:

  • Add the @progress/kendo-angular-editor package as a dependency to the package.json file.
  • Import the EditorModule in the current application module.
  • Register the Kendo UI Default theme in the angular.json file.
  • Add all required peer dependencies to the package.json file.
  • Trigger npm install to install the theme and all peer packages that are added.

Manual Setup

The manual setup provides greater visibility and better control over the files and references installed in your Angular application. You can install the required peer dependencies and a Kendo UI theme by running separate commands for each step and import the desired component modules in your application root or feature module.

  1. Install the Editor package together with its dependencies by running the following command:

     npm install --save @progress/kendo-angular-editor @progress/kendo-angular-buttons @progress/kendo-angular-common @progress/kendo-angular-dialog @progress/kendo-angular-dropdowns @progress/kendo-angular-inputs @progress/kendo-angular-intl @progress/kendo-angular-l10n @progress/kendo-angular-popup @progress/kendo-angular-toolbar @progress/kendo-drawing @progress/kendo-licensing
  2. The next step is to style the component by installing one of the available Kendo UI themesKendo UI Default, Kendo UI Material, or Kendo UI Bootstrap.

    2.1 To start using a theme, install its package through NPM.

    • Default theme

      npm install --save @progress/kendo-theme-default
    • Bootstrap theme

      npm install --save @progress/kendo-theme-bootstrap
    • Material theme

      npm install --save @progress/kendo-theme-material

    2.2 After the theme package is installed, reference it in your project. You can include kendo-themes in your project in one of the following ways:

Using the Component

  1. After successfully installing the Editor package and importing its module, add the following code in the app.component.html file:

    <kendo-editor [value]="value"></kendo-editor>
  2. Bind the value property to an HTML string value in the app.component.ts file:

    public value = `<p> The Editor enables users to create rich textual content. </p>`;
  3. Build and serve the application by running the following command in the root folder.

    ng serve
  4. Point your browser to http://localhost:4200 to see the Kendo UI for Angular Editor component on the page.

Activating Your License Key

As of December 2020, using any of the UI components from the Kendo UI for Angular library requires either a commercial license key or an active trial license key. If your application does not contain a Kendo UI license file, activate your license key.

Next Steps

Dependencies

The following table lists the specific functionalities that are provided by each of the Editor dependencies as per package:

Package NameDescription
@angular/commonProvides the commonly-needed services, pipes, and directives provided by the Angular team. For more information, refer to the official Angular documentation.
@angular/coreContains critical runtime parts of the Angular framework that are needed by every application. For more information, refer to the official Angular documentation.
@angular/formsProvides support for both template-driven and reactive forms. For more information, refer to the official Angular documentation.
@progress/kendo-angular-l10nProvides the globalization features of Kendo UI for Angular.
@progress/kendo-angular-intlProvides the Kendo UI for Angular services and pipes for the parsing and formatting of dates and numbers.
@progress/kendo-angular-commonContains common utilities that are needed by every Kendo UI for Angular component.
@progress/kendo-drawingProvides the Kendo UI cross-browser library for interactive vector graphics.
@progress/kendo-angular-buttonsContains the Kendo UI for Angular Buttons components.
@progress/kendo-angular-dialogContains the Kendo UI for Angular Dialog components.
@progress/kendo-angular-dropdownsContains the Kendo UI for Angular Dropdowns components.
@progress/kendo-angular-inputsContains the Kendo UI for Angular Inputs components.
@progress/kendo-angular-popupContains the Kendo UI for Angular Popup component.
@progress/kendo-angular-toolbarContains the Kendo UI for Angular ToolBar component.
@progress/kendo-licensingContains the kendo-ui-license CLI Tool for license management and the validatePackage function and type definitions that are used by licensed packages.
rxjsProvides the RxJS library for reactive programming which uses Observables for an easier composition of asynchronous or callback-based code.

The following table lists the dependencies which will get automatically installed when you add the rest of the dependency packages.

Package NameDescription
prosemirror-commandsProvides fundamental ProseMirror command functions for encapsulating an editing action. For more information, refer to the official ProseMirror documentation.
prosemirror-historyContains the ProseMirror implementation for the history of undo and redo actions. For more information, refer to the official ProseMirror documentation.
prosemirror-inputrulesDefines a ProseMirror plugin for attaching input rules to an editor. For more information, refer to the official ProseMirror documentation.
prosemirror-keymapContains a ProseMirror plugin for defining key bindings. For more information, refer to the official ProseMirror documentation.
prosemirror-schema-basicDefines a simple ProseMirror schema which can be used directly, extended, or used in another schema. For more information, refer to the official ProseMirror documentation.
prosemirror-schema-listContains list-related ProseMirror schema elements and commands. For more information, refer to the official ProseMirror documentation.
prosemirror-stateImplements the state object of a ProseMirror editor and the representation of the selection and the plugin abstraction. For more information, refer to the official ProseMirror documentation.
prosemirror-modelDefines the content model of ProseMirror and its data structures. For more information, refer to the official ProseMirror documentation.
prosemirror-viewDisplays a specific editor state in the DOM and handles user events. For more information, refer to the official ProseMirror documentation.
@type/prosemirror-commandsContains the type definitions for the prosemirror-commands module.
@type/prosemirror-historyContains the type definitions for the prosemirror-history module.
@type/prosemirror-inputrulesContains the type definitions for the prosemirror-inputrules module.
@type/prosemirror-keymapContains the type definitions for the prosemirror-keymap module.
@type/prosemirror-schema-basicContains the type definitions for the prosemirror-schema-basic module.
@type/prosemirror-schema-listContains the type definitions for the prosemirror-schema-list module.
@type/prosemirror-stateContains the type definitions for the prosemirror-state module.
@type/prosemirror-modelContains the type definitions for the prosemirror-model module.
@type/prosemirror-viewContains the type definitions for the prosemirror-view module.

Learning Resources