Bug 34839 - Shouldn't TinyMCE initialise with the Koha interface stylesheet?
Summary: Shouldn't TinyMCE initialise with the Koha interface stylesheet?
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks: 34840
  Show dependency treegraph
 
Reported: 2023-09-20 09:59 UTC by Martin Renvoize (ashimema)
Modified: 2024-07-25 05:51 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2023-09-20 09:59:32 UTC
When we initialise TinyMCE in the HTML Customisation page we pass `content_css : "[% interface | html %]/[% theme | html %]/css/tinymce.css"`.

Shouldn't we be passing the stylesheet/stylesheets of the interface we're editing rather than a specific tinymce sheet?  That would more accurately represent how your content block is actually going to appear to the end user than it does now.. for example taking account of page-section classes if you add such a div into your markup?

Or am I mis-understanding what the content_css option does?
Comment 1 Martin Renvoize (ashimema) 2023-09-20 10:20:11 UTC
`content_style:` could also be used to include the *UserCSS preference contents
Comment 2 Martin Renvoize (ashimema) 2023-09-20 10:21:57 UTC
Where I see challenges creeping in..

* Where we use a content block on both Staff and OPAC
* Dynamically switching sheet after initial load when selecting the display location/interface
Comment 3 Martin Renvoize (ashimema) 2023-09-20 10:27:19 UTC
https://www.tiny.cloud/docs/tinymce/6/add-css-options/ is probably helpful