plone / plone.staticresources

Static resources for Plone
https://pypi.org/project/plone.staticresources/
4 stars 12 forks source link

Plone 6 - Classic UI: TinyMCE `content.min.css` GET error #327

Open szakitibi opened 3 months ago

szakitibi commented 3 months ago

What happens Adding a textarea with pat-tinymce class results:

GET http://localhost:8080/Plone/++webresource++74456754-c4ae-5e78-b089-c480f83eb0c7/++plone++static/bundle-plone/chunks/skins/content/default/content.min.css net::ERR_ABORTED 404 (Not Found)

Steps to reproduce

  1. clone git@github.com:collective/minimalplone6.git, run buildout and create a Plone 6 Classic UI site
  2. add a browser page with TinyMCE <textarea class="pat-tinymce" data-pat-tinymce='{"inline": false}'></textarea>
  3. open the view and check developer tools console for the above error

Versions:

Note: With latest 2.2.0a6 it is still present, but the error is not present for "inline": true, nor with built in forms (e.g. ++add++Document, ++add++Event).

What I expect

A documentation on how to initialize TinyMCE without errors would be good. Or a bugfix, if it is a bug.

szakitibi commented 3 months ago

Getting a quite similar errors for a custom TinyMCE inline initialization.

image

It is a quite basic one, has no theme/skin configuration, only an inline TinyMCE with Undo/Redo buttons.

    <div id="customtiny">Some editable text ...</div>

and

        tinymce.init({
            "target": $("#customtiny").get(0),
            "inline": true,
            "menubar": false,
            "toolbar": "undo redo"
        });

Update: Adding skin: false to the config makes the above errors go away for the custom plugin. It does not fix though the original issue. Might relate to https://github.com/tinymce/tinymce-react/issues/53?