Theme's CSS file should be loaded

Peter Bex - November 6, 2009 - 21:15
Project:Whizzywig
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Issue tags:CSS, styling, wysiwyg
Description

Right now whizzywig isn't really what you see is what you get; the site's styles are not applied, so if for example you color all H1 headings green, this doesn't appear in the editor. To make this work properly, quite a bit of work is needed (perhaps some literal drupal_get_css() output could be passed as a string and written into the iframe's HEAD tag?)

However, a pretty simple fix is to use the whizzywig CSS file that you can define in the settings on the admin page, and stick it in the 'cssFile' JS option for the editor. See the attached patch for a trivial implementation of this.

On my current project, I changed this setting to a relative path back into my theme (../../../themes/mytheme/css/style.css) and use the theme's CSS file. I know it's a nasty hack, but that way I get a "mostly WYSIWYG" output :) (it's acceptable for my uses, for now)

AttachmentSize
whizzywig.module-cssfile.patch633 bytes

#1

drupal-id.com - November 8, 2009 - 15:50
Status:active» patch (to be ported)

This is very nice patch.
Very busy this week, but I will review this patch soon. Thanks.

#2

drupal-id.com - November 10, 2009 - 08:02

To solve this issue I will provide option like this:

AttachmentSize
css_file_choosen.png 2.92 KB

#3

drupal-id.com - November 12, 2009 - 06:13
Status:patch (to be ported)» closed

6.x-1.0-BETA3: Bug fix: including css file

 
 

Drupal is a registered trademark of Dries Buytaert.