Categories

Friday, April 19, 2024
#919814419350 therichposts@gmail.com
Angular 7.2.4Angular7Javascript

Angular 7 Tinymce working example

Hello to all, welcome to therichpost.com. In this post, I will tell you, Angular 7 Tinymce working example.

Friends, here is tinymce update version for angular 10 and angular 11:
Angular 10 Tinymce

Angular 7 is getting popularity these days. If you are new in Angular then you can check my old posts related to Angular.

Also guy’s, here you can check my Angular 11 posts: Angular 11 Tutorial


Today I will implement TinyMCE – JavaScript Library for Rich Text Editing in Angular 7.2.4 latest version.


Angular 7 Tinymce working example
Angular 7 Tinymce working example

Here is the working code snippet and you need to follow carefully:

1. Here are some basics commands to add new Angular setup and other libraries:

ng new angulartinymc

cd angulartinymc

npm i tinymce

2. Here is code, you need to add your angular.json file:

...
"styles": [
              "node_modules/tinymce/skins/ui/oxide/skin.min.css",
              "node_modules/tinymce/skins/ui/oxide/content.min.css",
              "node_modules/tinymce/skins/content/default/content.min.css",
              "src/styles.css",

            ],
"scripts": [
              "node_modules/tinymce/tinymce.min.js",
              "node_modules/tinymce/themes/silver/theme.js"
            ]
...

3. Here is the code, you need to add app.component.ts file:

import { Component, OnInit } from '@angular/core';
declare var tinymce: any;
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  title = 'angulartinymc';
  ngOnInit() {
  	
  		tinymce.init(
        {
            selector: "#mymce1"
        });
  }
}

4. Here is the code, you need to add app.component.html file:

<textarea id="mymce1"></textarea>

In the end run ng serve command and check the output. If you have any query related to this post, then please do comment below.

Note: Friends, In this post, I just tell the basic setup and things, you can change the code according to your requirements.

I will appreciate that if you will tell your views for this post. Nothing matters if your views will be good or bad because with your views, I will make my next posts more good and helpful.

Harjas,

Thank you.

therichpost
the authortherichpost
Hello to all. Welcome to therichpost.com. Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know WordPress, Core php, Angularjs, Angular 14, Angular 15, Angular 16, Angular 17, Bootstrap 5, Nodejs, Laravel, Codeigniter, Shopify, Squarespace, jQuery, Google Map Api, Vuejs, Reactjs, Big commerce etc.

64 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.