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

Tinymce UI css updates #345

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Tinymce UI css updates #345

wants to merge 6 commits into from

Conversation

petschki
Copy link
Member

@petschki petschki commented Aug 5, 2023

TinyMCE <iframe/> implementation has missing CSS definitions of plone content. For example if you align an image on the right you see it in the view mode but not when editing it in TinyMCE. This PR extends the tinymce-ui-content.css with the barceloneta/base CSS via SCSS.

@mister-roboto
Copy link

@petschki thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@petschki
Copy link
Member Author

petschki commented Aug 5, 2023

@jenkins-plone-org please run jobs

@petschki
Copy link
Member Author

petschki commented Oct 23, 2023

Had time to dig more into this. Turns out, that the internal content_css configuration logic is based on three parameters concated together (see https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/patterns/tinymce.py#L34):

  • method parameter injection (not used in core packages)
  • contents of ITinyMCESchema.content_css registry attribute
  • configuration of theme metadata.cfg -> tinymce-content-css variable

So theres a problem here, because if you use a Diazo based theme with tinymce-content-css configured (default in plonetheme.barceloneta an with bobtemplates.plone created themes), you end up with unneeded duplicated CSS code in TinyMCE.

OTOH if your theme doesn't configure the CSS in metadata.cfg, you have unstyled content in TinyMCE right now.

Do not know how to proceed here, but I mark this as draft right now.

/cc @MrTango

@petschki petschki marked this pull request as draft October 23, 2023 07:45
@petschki
Copy link
Member Author

@gogobd @jensens maybe interesting for you too ⬆️

@petschki
Copy link
Member Author

Thinking more about this we could say that it's more a documentation problem. Tell the integrators how to get their styles into tiny either with configured tinymce-content-css or with customized ITinyMCESchema.content_css registry value.

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.

3 participants