4

I am integrating TinyMCE into my Angular 13 project and it was working fine until this error started popping up :

Here is a picture of the error in console. enter image description here

enter image description here I am new to Angular but from what I understand, Angular cannot find the files for the theme.

Here is the relevant part of the angular.json file

   "assets": [ 
              "src/favicon.ico",
              "src/assets"
            ]
            ,
            "styles": [
              "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
              "src/styles.css"
            ],
            "scripts": [
              "node_modules/tinymce/tinymce.min.js"
            ]

here is the initialization for the editor

 init={
    base_url: '/tinymce', // Root for resources
    suffix: '.min' ,       // Suffix to use when loading resources
    height: 300,
     plugins: [
       'advlist autolink lists link image charmap print preview anchor',
       'searchreplace visualblocks code fullscreen',
       'insertdatetime media table paste code help wordcount'
     ],
    menubar: false,
    toolbar: 'undo redo | formatselect | fontselect | fontsizeselect |'+
    '| bold italic backcolor | alignleft aligncenter ' +
    'alignright alignjustify | bullist numlist outdent indent |' +
    'removeformat | link image media |',
    font_formats: 'Arial=arial,helvetica,sans-serif; Courier New=courier new,courier,monospace',
    
  };

version of tinymce

 "@tinymce/tinymce-angular": "^4.2.4",
    "rxjs": "~7.4.0",
    "tinymce": "^5.10.2",

I have tried to fix this the last 2 hours using various blogs and cannot find the issue. If anyone can point out the issue or help in any kind of way..

Devi Suresh
  • 129
  • 1
  • 10

0 Answers0