Using TinyMCE from Tiny Cloud in Angular

This guide shows how to integrate TinyMCE from Tiny Cloud into an Angular application using the TinyMCE Angular component.

The steps below use standalone components. If using Angular Modules, see Angular Modules.

Prerequisites

This procedure requires Node.js (and NPM).

Procedure

  1. From a terminal or command prompt, install the Angular CLI Tool globally.

    npm install -g @angular/cli
  2. Create a new Angular project named tinymce-angular-demo using default settings and without Git initialization.

    ng new --defaults --skip-git tinymce-angular-demo
  3. Navigate into the project directory and install tinymce-angular.

    cd tinymce-angular-demo && npm install @tinymce/tinymce-angular
  4. Update the root component app.component.ts to import EditorComponent component.

    import { Component } from '@angular/core';
    import { EditorComponent } from '@tinymce/tinymce-angular';
    
    @Component({
      selector: 'app-root',
      imports: [EditorComponent],
      template: `
      <h1>TinyMCE 8 Angular Demo</h1>
      <editor
        [init]="init"
        apiKey="no-api-key"
      />
      `
    })
    export class AppComponent {
      init: EditorComponent['init'] = {
        plugins: 'lists link image table code help wordcount'
      };
    }
  5. Update the apiKey with your own Tiny Cloud API key.

  6. Run the Angular a development server

    ng serve

Other resources