Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to enable TinyMCE inline mode #3408

Closed
wants to merge 53 commits into from
Closed

Conversation

pbauer
Copy link
Member

@pbauer pbauer commented Jan 19, 2022

No description provided.

@pbauer
Copy link
Member Author

pbauer commented Jan 21, 2022

This may require changes in mockup (or widget). Currently it fails with:

Could not initialize inline editor on invalid inline target element 
<textarea id="id06d8" class="form-control" name="form.widgets.IRichTextBehavior.text">

It also requires a upgrade-step that updates the registry.

@pbauer pbauer added this to the Plone 6.0 milestone Jan 26, 2022
@pbauer pbauer requested a review from thet January 26, 2022 17:37
@pbauer pbauer removed the request for review from thet January 26, 2022 17:38
MrTango and others added 24 commits January 28, 2022 18:13
PLIP 3211 - Remove support for conditional comments in script and style tags.
It's not supported since IE10.
See: https://en.wikipedia.org/wiki/Conditional_comment
Add a JavaScript global variable ``__patternslib_public_path__`` to define the path for webpack chunks which are dynamically imported.
… uses. NOTE: the hardcoded SCSS variable from mockup still takes precedence. It's also raised to 220px.
… no need to set __patternslib_public_path__ anymore.
…handling for bundles/resources. Needs revisiting and reimplenentation following PLIP proposal.
@pbauer pbauer force-pushed the add_tinymce_inline_mode branch from 7924533 to 2ea4f91 Compare February 2, 2022 09:07
@thet thet force-pushed the es6 branch 2 times, most recently from b966da2 to b5118f9 Compare March 24, 2022 11:47
Base automatically changed from es6 to master March 24, 2022 14:32
@pbauer
Copy link
Member Author

pbauer commented Mar 26, 2022

Obsolete since more mork would be needed. See #3465

@pbauer pbauer closed this Mar 26, 2022
@thet
Copy link
Member

thet commented Mar 27, 2022

@pbauer I would want to give this another try.
This PR got out of sync with the base branch. Is the last commit the one which is relevant for this PR?

I recently did an example for a different project to enable inline editing among some other tiny customizations (to actually enable TinyMCE in collective.z3cform.datagridfield). This is for Plone 5 - maybe we need some adaptions for the tinymce pattern in Plone 6 to allow inline editing.

This is it:

from plone.app.textfield import RichText
from plone.app.z3cform.widget import RichTextWidget
from plone.autoform.directives import widget

[...]

    # inline: True necessary for reordering rows, otherwise tinymce would not render correctly.
    # tiny config to reduce UI
    widget("description", RichTextWidget, pattern_options={
        "inline": True,
        "tiny": {
            "toolbar": "bold italic bullist unlink plonelink",
            "plugins": ["plonelink", "lists", ],
            "menubar": "",
        },
    })
    # RichText for TinyMCE
    # allowed_mime_types to not get the mimetype selector and for tinymce to actually work.
    # the mimetypeselector has a config for the textfield, but here we are cloning textfields and the mimetypeselector config isn't updated.
    description = RichText(title=u"Beschreibung", required=False, allowed_mime_types=["text/html"])

@thet
Copy link
Member

thet commented Apr 5, 2022

Follow up: #3465

@thet thet deleted the add_tinymce_inline_mode branch April 5, 2022 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants