question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to load tinymce myself vs. cloud

See original GitHub issue

I’ve got tinymce loading outside of a vue component via the tinymce npm package, ie.

import tinymce from 'tinymce/tinymce';
import 'tinymce/themes/modern/theme';

import 'tinymce/plugins/paste';
import 'tinymce/plugins/media';
import 'tinymce/plugins/textcolor';
import 'tinymce/plugins/lists';
import 'tinymce-line-height-plugin/lineheight/plugin';
import 'tinymce/plugins/link';
import 'tinymce/plugins/table';
import 'tinymce/plugins/hr';
import 'tinymce/plugins/print';
import 'tinymce/plugins/autosave';
import 'tinymce/plugins/fullscreen';
import 'tinymce/plugins/image';

tinymce.init({
    selector: '.tinymce',
    theme: 'modern',
    menubar: false,
    plugins: ['paste', 'image', 'media', 'textcolor', 'lists', 'lineheight', 'link', 'table', 'hr', 'print', 'autosave', 'fullscreen', 'image'],
    skin_url: '/tinymce/skins/lightgray',
    branding: false,
    toolbar: [
        'bold italic underline removeformat | strikethrough superscript subscript | fontsizeselect | backcolor | bullist numlist | styleselect | lineheightselect',
        'link image media table hr | fullscreen undo redo print restoredraft'
    ]
});

but when I try to use <editor> with a Vue component with something like:

<editor id="evidence-editor" class="tinymce">

tinymce-vue isn’t detecting that I’m attaching tinymce myself via the class. Also tried changing the selector to use the evidence-editor ID instead, but regardless it’ll attached tinymce twice with one displaying the This domain is not registered with TinyMCE Cloud" error. I even tried setting window.tinymce = tinymce to satisfy the getTinymce function within tinymce-vue.js.

Is there something I’m missing to be able to load tinymce myself via the npm package?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
brianhoggcommented, Apr 12, 2018

Looks like that did the trick, along with ensuring the module/plugin is loaded before Vue is initialized. Thanks!

1reaction
fyrkantcommented, Apr 12, 2018

I think you need to change the

import tinymce from 'tinymce/tinymce';

to

import 'tinymce';

to make it global.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Most common plugin errors in TinyMCE and how to fix them
Ways to fix the most common plugin errors in TinyMCE and why those happen, including “TinyMCE failed to load plugin” error.
Read more >
TinyMCE not working: possible causes and fixes
The Self-hosted configuration works best when you: Unzip the TinyMCE file, and move it into the same directory as your application or project....
Read more >
Cloud Troubleshooting | Docs
Tiny Cloud verifies the domain TinyMCE is loading from by checking the domain portion of the Referer header in the network request. You...
Read more >
Cloud Troubleshooting | TinyMCE Documentation
Cause · Open your browser's Developer's Tools. · Open the Network tab. · Find and select the request being made to load TinyMCE...
Read more >
Plugin errors: fixing the most common error messages
It means that you're using a TinyMCE Core version (that's TinyMCE free and open source, either Tiny Cloud or Self-hosted) and have a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found