'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?



Solution 1:[1]

Thank you @Ignacio Ara. A free API key is valid only for 30 days. I have used CSS property display none for the class .mce-notification.mce-in that resolved my problem.

Solution 2:[2]

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';
  }
 });

Solution 3:[3]

I have solved my problem with the use

<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>

Solution 4:[4]

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>

Solution 5:[5]

This will remove only the first "free trial" warning notification (and leave other notifications like deprecated plugins, errors, etc).

tinymce.init({
  selector: 'textarea',
  init_instance_callback : function(editor) {
      var freeTiny = document.querySelector('.mce-notification');
      freeTiny.style.display = 'none';
  }
});

Solution 6:[6]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 hakamairi
Solution 3 Mohammed Abu Faysal
Solution 4 Ignacio Ara
Solution 5 mfink
Solution 6 Nathan Goings