Configure API key for tinyMCE

Hi,

I’m configuring tinymice with the offical docs, time ago it works fine but now no.
https://docs.tryton.org/projects/server/en/latest/topics/configuration.html#html

I receive a notification about the API Key

How to configure correctly it?

Best!

You need to change the src for the one including your registered key.

I already made the change but it doesn’t work, there is an error with the CORS configuration

I guess you must register your domain name so tinyMCE server allow cross-origin

I registered my domain, now I have tinyMCE error (I’m not sure)


function parseScriptEvents(document, frame) {
    // TODO: parsed in iframe
    const scriptTags = document.getElementsByTagName('script');
    const parsedEvent = {}; // key: pixel ID, value: Map<eventName, code>
    for (const script of scriptTags) {
        // One script snippet might contain multiple pixelIds
        let pixelIds = [];
        if (script?.textContent?.length > 0) {
            for (const match of script.textContent.matchAll(regEx)) {
                // match[0] is the full string, like fbq("init", pixelId) or fbq("track", "PageView")
                // match[1] is the first matched element, eg "init" or "track"
                // match[2] is the second matched element, eg "pixelId" or "PageView"
                **if (match[1] === 'init')) { // ("init", "pixelId', optional something else")**

The error is in last line

Uncaught SyntaxError: Unexpected token ')'

In addition, tinymce’s prices [0] are high ($67 USD /month) for only 5000 editor / month in its cheapest plan. I use more than 6000 each month.
[0] Pricing | WYSIWYG HTML Editor | TinyMCE

Any other options you have for uploading HTML content, copying and pasting to text? If I copy and paste the html code from another location and put it in the text, it does not copy the labels, only the text.

Thank you

I solved the issue using version 4 of TinyMCE, it works fine.

src = https://cdn.tiny.cloud/1/API_KEY/tinymce/4/tinymce.min.js

See Update TinyMCE to version 5 (#8683) · Issues · Tryton / Tryton · GitLab

1 Like

I tried version 5 but it didn’t work, at least since the last TinyMCE update. Version 4 works fine.