Styling TinyMCE for a Diazo-enhanced Plone website

Initially, I believed that TinyMCE would remain unaffected by the Diazo theme. However, there seems to be some CSS creeping in from somewhere, causing certain functions to be more difficult to use. For instance, the line height on all the rows has drastically decreased, making it challenging to select each row.

By examining Firebug, I found that I can resolve this issue by adding a min-height value from dialog.css:

.radioscrolllist .list {min-height: 2em;}

Unfortunately, I have been unable to find where to implement this fix permanently. I've attempted to place it in the Diazo theme style.css, ploneCustom.css, and customized both portal_skins/tinymce/themes/advanced/skins/plone/dialog.css and portal_skins/tinymce/plugins/plonebrowser/css/plonebrowser.css — but none of these solutions have worked.

Do you have any suggestions on how/where I can make this correction? This issue only arises in the Diazo version of the site, not the unthemed version. It appears that the only CSS files loading on the TinyMCE iframe are:

  • dialog.css
  • plonebrowser.css
  • columns.css

Answer №1

Here's a snippet from my project's CSS that tackles a similar issue. However, I encounter different challenges with each project, especially when it comes to general CSS and columns:

/* Fix TinyMCE gremlins */
#internallinkcontainer div.row {
    /* Image browser was jumbled */
    float: none;
}
#content #internallinkcontainer .list.item span, 
#content #internallinkcontainer .list.item a {
    /* Link browser was packed too much */
    position: inherit;
}
#internallinkcontainer input[type="radio"] {
    vertical-align: middle;
}

/* @end */

Implementing the above code helps restore the appearance of my Link Browser.

Aside from the challenges with Diazo-CSS, it seems like there could be an issue with plone.css being cached. The information below is sourced from the developer manual, with modifications that I have made but have not yet been incorporated.

plone.css

plone.css is dynamically generated based on the portal_css registry configuration. It is primarily used in TinyMCE to consolidate all CSS styles into the TinyMCE editor in one go. It is not utilized on standard Plone pages.

Generation of plone.css:

https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/skins/plone_scripts/plone.css.py

Note: plone.css is @import-ed by dialog.css, which prevents it from being refreshed when a normal Plone page is reloaded in the browser, even in development mode. Therefore, if you notice that your CSS updates are not reflected in the TinyMCE plugin (e.g. in the link/image browser) while working on your theme, simply perform a hard refresh directly on: /plone.css to clear the cached version.

Answer №2

Last week, I encountered the same issue and came up with a workaround. I resolved it by including the following code in my theme's CSS. It's worth noting that the tinymce dialogs are not part of the iframe that holds the edited content; instead, they are in the main frame:

#internallinkcontainer.radioscrolllist { line-height: auto !important; }
#internallinkcontainer .list.item span, #internallinkcontainer .list.item a { position: static !important; }

(It's clear that a more elegant solution should be found in the future, but for now, this workaround suffices.)

Answer №3

It appears that you've come close to figuring it out on your own: tweaking the column.css file should do the trick without the need for any important declarations.

Furthermore, it seems that this issue may not be Diazo-related, as the ploneCustom.css file will not be transmitted to the dialog window on a non-diazo website. Interesting.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to incorporate arrow buttons on my website in order to unveil various sections on the homepage?

A colleague and I are collaborating on a website for his cookery business. He has sketched out some design ideas on paper, one of which involves having a homepage with 4 different sections stacked on top of each other. Each section would have an arrow butt ...

Looking to save a CSS element as a variable

I am working on improving the readability of my code in Protractor. My goal is to assign a CSS class to a variable and then use that variable within a click method. element.all(by.css("div[ng-click=\"setLocation('report_road')\"]")).cl ...

Enhance your website with the latest jQuery plugins and CSS

Currently, I am utilizing jQuery to develop plugins for my application. It is worth noting that each plugin demands a distinct CSS file. What approach should I follow to effectively load both the jQuery file and the respective CSS? Moreover, the plugins ...

Make sure to employ Bootstrap's justify-content-between and stack-to-horizontal col correctly

I am currently working on a responsive form that contains 1 label, 1 input field, and 5 buttons. Both the buttons and the input field are located under col-8. The positioning I aim for the buttons is as follows: They should start below and align with ...

Increase the spacing between the scrollbar and the border

Looking to create some breathing room between the scrollbar and the right border of my text area. I've tried adjusting the margin-right/left values in -webkit-scrollbar with no success. Here's my style component: const FormTextArea = styled.texta ...

Styling the large drop-down menu for Internet Explorer 7

Check out the code snippet at http://jsfiddle.net/jN5G4/1/ Is there a way to align the drop-down menu for "5 Columns" to match the alignment of the other drop-downs? After removing the <a href...> </a> tags from the 5 Columns list item, the d ...

Tips for creating a dynamic text that adjusts to different screen sizes within a bootstrap button

When utilizing the w3.css and bootstrap libraries to add a link button, an issue arises when resizing the screen as the text inside the button does not respond accordingly. How can we ensure that the text fits within the button based on the screen resoluti ...

Having trouble with the href attribute not properly redirecting to a different page

I am trying to create a hyperlink for an option that will take users to another page. All the other options on the page lead to different sections within the same page. When I add CONTACT, it doesn't work. All the files are in the same ...

The background hue does not cover the entire element

When I hover over my drop-down menu button, the grey color only covers up to where I set the padding. Here is my HTML snippet: Help ▾ Give Get Help Get Involved I want the grey color to expand fully across the "li" ...

CSS - Text and dropdown misalignment due to spacing issue

I'm looking to decrease the spacing between the text "Allow type of Compartment Option" and the dropdown box. Here is the code snippet being used: .cl-checkbox { padding-left: 20px; padding-bottom: 10px; padding-top: 20px; ...

What is the best way to incorporate an image zoom-in effect into a flexible-sized block?

Having a fluid grid with 3 blocks in one row, each set to width:33.3%. The images within these blocks are set to width: 100% and height: auto. I am looking to implement a zoom-in effect on hover for these images without changing the height of the blocks. I ...

Issue with Error in Expanding Label in Material-Ui using React

I have managed to increase the size of the Label in the TextField component of my React application. However, I am encountering an issue where it overlaps some text on its right when it shrinks. https://i.sstatic.net/BikHJ.png Here is the link for refere ...

Customize Material UI components by incorporating SASS classes

Currently, I am using Material UI components but I want to streamline my styles by moving them all into a .scss file. Right now, I have a significant styles object within the same JavaScript file where I am utilizing the Material UI components. This styles ...

What is the best way to modify the colors of two specific elements using a combination of CSS and JavaScript

I am currently developing a browser-based game and have encountered an issue. Here is the relevant line of my HTML/PHP code: echo '<div id="div'.$n.'" class="d'.$rand.'" onclick="swapit(this.id, this.className)"></di ...

Why my attempts to alter numerous CSS elements using JQuery are failing?

Here's the code snippet I'm working with: var showThis = $(this).attr('id'); // div0, div1, div2 etc. $('#' + showThis).attr('style', 'background-color: #063 !important, height: 520px'); I am trying to mo ...

The Stylish Choice: Materialize CSS Dropdown Selector

I am currently integrating Materialize CSS into my application and have used media queries to ensure that the layout is responsive. However, I am facing an issue with a select dropdown element. It works fine on laptops but does not allow for selecting any ...

center items alignment with hidden tags

I'm currently facing an issue with the CSS property display: flex, align-items: center Here is a snippet of my HTML and CSS files: * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Kumbh Sans', sans-serif; } .na ...

What is the best way to align the logo image to the left side of the Material UI app bar without any gaps?

Currently, I am working on a material UI app bar to serve as my navigation bar. The issue I am encountering involves the logo image on the left side of the page having excessive spacing from the edge, as shown in the image below. I've tried adjusting ...

Why is it that a label tag cannot be placed directly above an input tag?

On this particular page: http://getbootstrap.com/components/#input-groups-buttons If you modify the Go! button to a label (using Chrome inspector), you will observe that the Go! button is no longer positioned on top of the input field: https://i.sstatic ...

"Implement a feature in JavaScript that allows users to click on images to navigate

I have a navigation feature on my website that allows me to cycle through images using the following code: <a href="JavaScript:previousImage()">Previous</a> | <a href="JavaScript:nextImage()">Next</a> <span id='num' ...