Hi,

While using wabi theme, i realized that markitup's CSS file (such as sites/all/libraries/markitup/skins/simple/style.css) isn't use to render the page.
To prevent this from happening :
edit the 94th line of wysiwyg/editors/markitup.inc
from : drupal_add_css($editor['library path'] . '/skins/' . $theme . '/style.css', 'theme');
to : drupal_add_css($editor['library path'] . '/skins/' . $theme . '/markitup-style.css', 'module');

And rename : sites/all/libraries/markitup/skins/simple/style.css into sites/all/libraries/markitup/skins/simple/markitup-style.css (or add a symlink).

I belive this is caused by the theme : "Modules should always prefix the names of their CSS files with the module name, for example: system-menus.css rather than simply menus.css. Themes can override module-supplied CSS files based on their filenames, and this prefixing helps prevent confusing name collisions for theme developers. See drupal_get_css where the overrides are performed." ( http://api.drupal.org/api/function/drupal_add_css )

Comments

TwoD’s picture

As you can see, there's a comment about this in markitup.inc itself. (Written by Sun, I believe.)

function wysiwyg_markitup_settings($editor, $config, $theme) {
  // Whoever is guilty for adding this horrible CSS-file-without-filepath
  // override "feature" to Drupal core... stand in the corner!
  drupal_add_css($editor['library path'] . '/skins/' . $theme . '/style.css'    , 'theme');

I'm afraid the proposed solution - modification of the library - is unacceptable. (At least as a long term solution.) We do our best to avoid having to modify library files to make them compatible with Wysiwyg or Drupal. It's very easy to forget such steps after upgrading the library, and the library may even have significant changes between versions so any README entries would quickly become outdated. It would be preferable to modify the theme for situations when this collision occurs, as it is already subject to heavy customization on a per site basis.

If anyone has ideas on how to avoid having to do either of these modifications, without jumping through too many hooks, I'm all ears.

UPDATE: D7 provides a way to use a different basename for MarkItUp's file so in D7 this will no longer be an issue. There doesn't seem to be much we can do for D6 though, other than document this, so I'm adding a note on the FAQ.

sun’s picture

Version: 6.x-2.1 » 7.x-2.0
Status: Active » Fixed

Yes, this can be fixed (and was already fixed) in D7 only. Drupal core bug. Sorry.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.