I'm using the media module with WYSIWYG with the CKEditor editor.
In media's WYSIWYG plugin, they pass both "css file" and "css path" as null.
In the wysiwyg_ckeditor_proxy_plugin_settings function, the following appears :
// @todo These should only be set if the plugin defined them.
'css' => base_path() . $plugin['css path'] . '/' . $plugin['css file'],
The end result of is that there is a <link />
added to the CKEditor's iframe that points at the root of the site.
I found this because I was trying to read some DSM calls, and they were all being eaten when a WYSIWYG appeared on a page. I think this is because the dsm output was being output to the front page that loads in the background.
This can be fixed by reworking this function to the following :
// Populate required plugin settings.
$settings[$name] = $plugin['dialog settings'] + array(
'title' => $plugin['title'],
'icon' => base_path() . $plugin['icon path'] . '/' . $plugin['icon file'],
'iconTitle' => $plugin['icon title'],
);
// CSS should only be set if the plugin defines it.
if( isset( $plugin['css path'], $plugin['css file'] ) ) {
$settings[$name]['css'] = base_path() . $plugin['css path'] . '/' . $plugin['css file'];
}
While I'm using 2.2, I checked the latest dev branch and note the problem is there as well.
Comment | File | Size | Author |
---|---|---|---|
#2 | wysiwyg-ckeditor-blank-css.2054885.2.patch | 763 bytes | TwoD |
Comments
Comment #1
TwoDOh, right, we should definitely add a not-empty check there. (An empty string still counts as set.)
Comment #1.0
TwoDfixing up formatting mistakes
Comment #2
TwoDCommitted this patch to all branches.
Thanks for reporting this and sorry for the long delay!