Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
****** xref:react-zip-bundle.adoc[Using a .zip package with bundling]
***** Angular
****** xref:angular-zip.adoc[Using a .zip package]
****** xref:angular-zip-bundle.adoc[Bundle TinyMCE from a .zip package]
***** Vue.js
****** xref:vue-zip.adoc[Using a .zip package]
***** Blazor
Expand Down
7 changes: 5 additions & 2 deletions modules/ROOT/pages/angular-cloud.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
= Using {productname} from the Tiny Cloud CDN with the Angular framework
= Using {productname} from Tiny Cloud in Angular
:navtitle: Angular
:description: A guide on integrating TinyMCE from the Tiny Cloud into the Angular framework.
:description: A guide on using TinyMCE from the Tiny Cloud in a Angular project.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:description: A guide on using TinyMCE from the Tiny Cloud in a Angular project.
:description: A guide on using TinyMCE from the Tiny Cloud in an Angular project.

:keywords: integration, integrate, angular
:productSource: cloud

This guide shows how to integrate {productname} from Tiny Cloud into an Angular application using https://github.com/tinymce/tinymce-angular[{productname} Angular component].


include::partial$integrations/angular-quick-start.adoc[]
68 changes: 18 additions & 50 deletions modules/ROOT/pages/angular-pm-bundle.adoc
Original file line number Diff line number Diff line change
@@ -1,53 +1,41 @@
= Bundling TinyMCE with an Angular application
= Bundling TinyMCE from NPM in an Angular application
:navtitle: Using a package manager with bundling
:description: A guide on bundling TinyMCE with an Angular application using Vite.
:description: A guide on bundling TinyMCE in an Angular application using Vite.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heading is NPM, this says Vite?

:keywords: integration, integrate, angular, bundle, vite, npm, tinymce
:productSource: package-manager
:packageName: @tinymce/tinymce-angular

The https://github.com/tinymce/tinymce-angular[Official {productname} Angular component] integrates {productname} into Angular projects. This procedure creates a https://angular.dev/tools/cli/setup-local[basic Angular application] containing a bundled {productname} editor.

For examples of the {productname} Angular integration, visit https://tinymce.github.io/tinymce-angular/[the tinymce-angular storybook].
This guide shows how to integrate the NPM version of {productname} in an Angular application.

== Prerequisites

This procedure requires https://nodejs.org/[Node.js (and NPM)].

== Procedure

. On a command line or command prompt, install the link:https://angular.dev/tools/cli[Angular CLI Tool] package.
. From a terminal or command prompt, install the link:https://angular.dev/tools/cli[Angular CLI Tool] globally.
+
[source,sh]
----
npm install -g @angular/cli
----

. Create a new Angular project named `+tinymce-angular-demo+`.
+
[source,sh]
----
ng new --defaults --skip-git tinymce-angular-demo
----
. Change into the newly created directory.
+
[source,sh]
----
cd tinymce-angular-demo
----
. Install the `+tinymce+` and `+@tinymce/tinymce-angular+` packages.

. Go to the newly project directory and install `+tinymce+` and `+@tinymce/tinymce-angular+`.
+
[source,sh]
----
npm install tinymce @tinymce/tinymce-angular
cd tinymce-angular-demo && npm install tinymce @tinymce/tinymce-angular
----
+
include::partial$integrations/premium-plugins-install-step-link.adoc[]
+
[NOTE]
====
For information on configuring premium plugins when bundling, see: xref:bundling-plugins.adoc#using-premium-plugins[Using premium plugins].
====
+
. Using a text editor, create `+src/app/editor.component.ts+` and set the contents to:


. Create `+src/app/editor.component.ts+`.
+
[source,ts]
----
Expand All @@ -74,11 +62,10 @@ import 'tinymce/plugins/lists';
import 'tinymce/plugins/table';
import 'tinymce/plugins/code';
import 'tinymce/plugins/help';
import 'tinymce/plugins/help/js/en.js';
// Include resources that a plugin lazy-loads at the run-time
import 'tinymce/plugins/help/js/i18n/keynav/en.js';
import 'tinymce/plugins/wordcount';

include::partial$integrations/premium-plugins-bundling.adoc[]

// Content styles, including inline UI like fake cursors
import 'tinymce/skins/content/default/content.js';
import 'tinymce/skins/ui/oxide/content.js';
Expand All @@ -103,7 +90,8 @@ export class MyEditorComponent {
}
----
+
. Using a text editor, open `+src/app/app.component.ts+` and update it to use the editor component:

. Open `+src/app/app.component.ts+` and update it to use `MyEditorComponent`:
+
[source,ts]
----
Expand All @@ -121,32 +109,12 @@ import { MyEditorComponent } from './editor.component';
})
export class AppComponent {}
----
+
. Run `+ng serve+` to start a dev server
+
[source,sh]
----
ng serve
----
+

. Build the application for production:
. Run the Angular development server
+
[source,sh]
----
ng build
ng serve
----
+
This command creates an optimized production bundle in the `+dist+` directory.

. If premium plugins are included, update the `+licenseKey+` option in the editor component and include your xref:license-key.adoc[License Key].

== Next Steps

* For information on bundling, see: xref:introduction-to-bundling-tinymce.adoc[]
* For examples of the {productname} integration, see: https://tinymce.github.io/tinymce-angular/[the tinymce-angular storybook].
* For information on customizing:
** {productname} integration, see: xref:angular-ref.adoc[Angular framework Technical Reference].
** {productname}, see: xref:basic-setup.adoc[Basic setup].
** The Angular application, see: https://angular.dev[the Angular documentation].
* For a complete example, see: https://github.com/tinymce/tinymce-angular-integration-examples/tree/self-hosted-with-npm-premium-plugins[the Angular bundling example repository].
include::partial$integrations/angular-other-resources.adoc[]
6 changes: 4 additions & 2 deletions modules/ROOT/pages/angular-pm.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
= Using the {productname} package with the Angular framework
= Using {productname} from NPM in Angular
:navtitle: Using a package manager
:description: A guide on integrating the TinyMCE package into the Angular framework.
:description: A guide on integrating the TinyMCE package into an Angular application.
:keywords: integration, integrate, angular
:productSource: package-manager

This guide shows how to integrate the NPM version of {productname} in an Angular application.

include::partial$integrations/angular-quick-start.adoc[]
119 changes: 119 additions & 0 deletions modules/ROOT/pages/angular-zip-bundle.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
= Bundling TinyMCE from .zip package in Angular
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
= Bundling TinyMCE from .zip package in Angular
= Bundling TinyMCE from a .zip package in Angular

:navtitle: Using a package manager with bundling
:description: A guide on bundling TinyMCE from a .zip package in an Angular application.
:keywords: integration, integrate, angular, bundle, vite, npm, tinymce
:productSource: package-manager
:packageName: @tinymce/tinymce-angular

This guide shows how to integrate {productname} from a `.zip` package in an Angular application.

== Prerequisites

This procedure requires https://nodejs.org/[Node.js (and NPM)].

== Procedure

. From a terminal or command prompt, install the link:https://angular.dev/tools/cli[Angular CLI Tool] globally.
+
[source,sh]
----
npm install -g @angular/cli
----

. Create a new Angular project named `+tinymce-angular-demo+`.
+
[source,sh]
----
ng new --defaults --skip-git tinymce-angular-demo
----

. Go to the new project directory and `+@tinymce/tinymce-angular+`.
+
[source,sh]
----
cd tinymce-angular-demo && npm install @tinymce/tinymce-angular
----

. Unzip the content of the `+tinymce/js+` folder from the link:{download-enterprise}[{productname} zip] into the `+src+` folder.

. Create `+src/app/editor.component.ts+` with the following:
+
[source,ts]
----
import { Component } from '@angular/core';
import { EditorComponent } from '@tinymce/tinymce-angular';
// Ensure you import TinyMCE to register the global variable required by other components
import '../tinymce/tinymce';
// DOM model
import '../tinymce/models/dom/model';
// Theme
import '../tinymce/themes/silver';
// Toolbar icons
import '../tinymce/icons/default';
// Editor styles
import '../tinymce/skins/ui/oxide/skin.js';
// Content styles, including inline UI like fake cursors
import '../tinymce/skins/content/default/content.js';
import '../tinymce/skins/ui/oxide/content.js';
// Import plugins
import '../tinymce/plugins/advlist';
import '../tinymce/plugins/autolink';
import '../tinymce/plugins/link';
import '../tinymce/plugins/image';
import '../tinymce/plugins/lists';
import '../tinymce/plugins/table';
import '../tinymce/plugins/code';
import '../tinymce/plugins/help';
// Include resources that a plugin lazy-loads at the run-time
import '../tinymce/plugins/help/js/i18n/keynav/en.js';
import '../tinymce/plugins/wordcount';
@Component({
selector: 'app-editor',
standalone: true,
imports: [EditorComponent],
template: `
<editor
[init]="init"
licenseKey="gpl"
/>
`
})
export class MyEditorComponent {
init: EditorComponent['init'] = {
height: 500,
plugins: 'advlist autolink lists link image table code help wordcount',
toolbar: 'undo redo | blocks | bold italic | alignleft aligncenter alignright | bullist numlist | help'
};
}
----

. Update `+src/app/app.component.ts+` to use `MyEditorComponent`.
+
[source,ts]
----
import { Component } from '@angular/core';
import { MyEditorComponent } from './editor.component';
@Component({
selector: 'app-root',
standalone: true,
imports: [MyEditorComponent],
template: `
<h1>TinyMCE Angular Demo</h1>
<app-editor />
`
})
export class AppComponent {}
----

. Run the Angular development server
+
[source,sh]
----
ng serve
----

include::partial$integrations/angular-other-resources.adoc[]
6 changes: 4 additions & 2 deletions modules/ROOT/pages/angular-zip.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
= Using the {productname} .zip package with the Angular framework
= Lazy-load {productname} from .zip package in Angular
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
= Lazy-load {productname} from .zip package in Angular
= Lazy-load {productname} from a .zip package in Angular

:navtitle: Using a .zip package
:description: A guide on integrating a .zip version of TinyMCE into the Angular framework.
:description: A guide on integrating a .zip version of TinyMCE into an Angular application.
:keywords: integration, integrate, angular
:productSource: zip

This guide shows how to self-host and lazy-load {productname} from a `.zip` package into an Angular application.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This guide shows how to self-host and lazy-load {productname} from a `.zip` package into an Angular application.
This guide shows how to self-host and lazy-load {productname} from a `.zip` package in an Angular application.

?


include::partial$integrations/angular-quick-start.adoc[]
17 changes: 8 additions & 9 deletions modules/ROOT/pages/cloud-quick-start.adoc
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
= Quick start: {productname} with {cloudname}
= Quick start: {productname} from {cloudname}
:navtitle: Quick start: Cloud
:description_short: Setup a basic {productname} {productmajorversion} editor using the {cloudname}.
:description: Get an instance of {productname} {productmajorversion} up and running using the {cloudname}.
:keywords: tinymce, script, textarea
:productSource: cloud

== Install {productname} using the {cloudname}

{productname} {productmajorversion} is a powerful and flexible rich text editor that can be embedded in web applications. This quick start covers how to add a {productname} editor to a web page using the {cloudname}.

include::partial$misc/admon-account-creation-and-social-option.adoc[]

== Include the {productname} script

Include the following line of code in the `+<head>+` of a HTML page:
Include the following script tag in the `+<head>+` of a HTML file:

[source,html,subs="attributes+"]
----
<script src="{cdnurl}" referrerpolicy="origin" crossorigin="anonymous"></script>
----

== Initialize {productname} as part of a web form
== Initialize {productname}

include::partial$install/initialize-editor-cloud.adoc[]

Adding this content to an HTML file and opening it in a web browser will load a {productname} editor, such as:
Adding this content to the HTML file and opening it in a web browser will load a {productname} editor, such as:

liveDemo::default[]

== Update the "no-api-key" placeholder with your API key
== Update the "no-api-key" placeholder

To remove the notice:
Update the `+no-api-key+` placeholder in the source script URL (`+<script src=https://.../no-api-key/tinymce/{productmajorversion}/tinymce.min.js+/>`) with your {cloudname} API key, which is created when signing up to the link:{accountsignup}/[{cloudname}].

Providing a valid API key also removes the notice:

[WARNING]
====
**This domain is not registered with {cloudname}. Please see the quick start guide or create an account.**
====

Update the `+no-api-key+` placeholder in the source script (`+<script src=...+`) with your {cloudname} API key, which is created when signing up to the link:{accountsignup}/[{cloudname}].

Signing up for a {cloudname} API key will also provide a trial of the xref:plugins.adoc#premium-plugins[Premium Plugins].

include::partial$install/save-content.adoc[]
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/introduction-to-bundling-tinymce.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:description: Introduction to bundling TinyMCE with Webpack, Rollup.js, or Browserify.
:keywords: webpack, browserify, es6, rollup, commonjs, modules, tinymce, es2015

The following guides and reference pages assist with bundling {productname} using a module loader, such as Webpack, Rollup.js, and Browserify. {productname} is a modular platform that is designed to lazy-load libraries when they are required. This allows developers to only bundle the components of {productname} that are required and keep the resulting bundle as small as possible.
The following guides and reference pages assists you bundle {productname} into your project using a module bundler, such as Webpack, Rollup.js, and Browserify.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following guides and reference pages assists you bundle {productname} into your project using a module bundler, such as Webpack, Rollup.js, and Browserify.
The following guides and reference pages assist with bundling {productname} into your project using a module bundler, such as Webpack, Rollup.js, and Browserify.

tripped over "assists your bundle" when reading, so.


== Webpack

Expand Down
9 changes: 6 additions & 3 deletions modules/ROOT/pages/react-cloud.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
= Using TinyMCE from the Tiny Cloud CDN with the React framework
= Using TinyMCE from Tiny Cloud in React
:navtitle: React
:description: A guide on integrating TinyMCE from the Tiny Cloud into the React framework.
:keywords: integration, integrate, react, reactjs, vite, tinymce-react
:description: A guide on integrating TinyMCE from the Tiny Cloud into React.
:keywords: integration, integrate, react, reactjs, vite, tinymce-react, tinymce
:productSource: cloud


This guide shows how to integrate TinyMCE from Tiny Cloud into a React application using link:https://github.com/tinymce/tinymce-react[{productname} React component].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This guide shows how to integrate TinyMCE from Tiny Cloud into a React application using link:https://github.com/tinymce/tinymce-react[{productname} React component].
This guide shows how to integrate TinyMCE from Tiny Cloud into a React application using the link:https://github.com/tinymce/tinymce-react[{productname} React component].

?


include::partial$integrations/react-quick-start.adoc[]
8 changes: 5 additions & 3 deletions modules/ROOT/pages/react-pm-bundle.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
= Bundle with TinyMCE and the React framework
:navtitle: Using a package manager with bundling
:description: A guide on integrating the TinyMCE package into the React framework by bundling it.
= Bundle TinyMCE in React
:navtitle: Bundle TinyMCE in a React project using a module bundler
:description: A guide on integrating the TinyMCE package into React by bundling it.
:keywords: integration, integrate, react, reactjs, vite, tinymce-react, bundle
:productSource: package-manager
:productUse: bundle

This guide shows how to integrate TinyMCE in a React application with link:https://github.com/tinymce/tinymce-react[{productname} React component].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This guide shows how to integrate TinyMCE in a React application with link:https://github.com/tinymce/tinymce-react[{productname} React component].
This guide shows how to integrate TinyMCE in a React application with the link:https://github.com/tinymce/tinymce-react[{productname} React component].

?


include::partial$integrations/react-quick-start.adoc[]
8 changes: 5 additions & 3 deletions modules/ROOT/pages/react-pm-host.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
= Lazy load TinyMCE with the React framework
= Self-host TinyMCE in React
:page-aliases: react-pm.adoc
:navtitle: Using a package manager with hosting
:description: A guide on integrating the TinyMCE package into the React framework by self-hosting it.
:navtitle: Self-host TinyMCE in React
:description: A guide on integrating TinyMCE into React by self-hosting it.
:keywords: integration, integrate, react, reactjs, vite, tinymce-react, host
:productSource: package-manager
:productUse: host

This guide shows how to self-host TinyMCE in a React application using link:https://github.com/tinymce/tinymce-react[{productname} React component].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This guide shows how to self-host TinyMCE in a React application using link:https://github.com/tinymce/tinymce-react[{productname} React component].
This guide shows how to self-host TinyMCE in a React application using the link:https://github.com/tinymce/tinymce-react[{productname} React component].

?


include::partial$integrations/react-quick-start.adoc[]
Loading
Loading