Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TinyMCE shows error in the editor

I have used tinyMCE for my project. but now I am getting a below error

This domain is not registered with TinyMCE Cloud. Start a free trial to discover our premium cloud services and pro support

Can anyone know how to get rid of this error message? without using paid service from tinyMCE?

like image 427
Prakash Patil Avatar asked Apr 26 '18 08:04

Prakash Patil


People also ask

How do I initialize TinyMCE editor?

Initialize TinyMCE 6 on any element (or elements) on the web page by passing an object containing a selector value to tinymce. init() . The selector value can be any valid CSS selector. For example: To replace <textarea id="mytextarea"> with a TinyMCE 6 editor instance, pass the selector '#mytextarea' to tinymce.

How do I enable TinyMCE editor in WordPress?

Log in to your WordPress Dashboard, click Plugins, then Add New. Search for the Advanced TinyMCE Configuration plugin, then click Install Now. Once the plugin is installed, click Activate.

Can I use TinyMCE without API key?

You can use TinyMCE without an API key. However there will be warning messages in the text editor area. Adding your API key to your app or project, removes these warning messages.


3 Answers

If you're using a JS framework like VueJS, you can use the tinymce-script-src attribute to use a non-cloud version of tinymce.min.js to avoid the error message but still have the framework functionality.

Example using a locally stored non-cloud file:

<editor tinymce-script-src="tinymce/tinymce.min.js" ... /> 

You can see why this works in the Vue implementation here: https://github.com/tinymce/tinymce-vue/blob/9ef5d30ff68c5428940ff4722bdb257e6079bc7e/src/main/ts/components/Editor.ts#L94

like image 150
Nathan Goings Avatar answered Sep 22 '22 21:09

Nathan Goings


It seems that you're using TinyMCE getting the file from their domain (cloud.tinymce.com), you should get a free key and update the URL e.g.:

<script src="http://cloud.tinymce.com/stable/tinymce.min.js?apiKey=[YOUR_API_KEY]"></script>
like image 28
Ignacio Ara Avatar answered Sep 18 '22 21:09

Ignacio Ara


I solved my problem used this function.

_tinymce.init({
  selector: 'textarea',
  init_instance_callback : function(editor) {
    var freeTiny = document.querySelector('.tox .tox-notification--in');
   freeTiny.style.display = 'none';
  }
 });
like image 20
Vijay Chauhan Avatar answered Sep 19 '22 21:09

Vijay Chauhan