Posted by -osiris- on August 8, 2010 at 1:16am
3 followers
Jump to:
| Project: | Whizzywig - A complete WYSIWYG Editor |
| Version: | 6.x-1.8 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | major |
| Assigned: | Unassigned |
| Status: | patch (to be ported) |
Issue Summary
Hi.
I have a copy of Whizzywig (running with whizzywig058.js) on a clean Drupal 6.17 installation. Next I try to include the editor with my article content-type. Editor shows up, yet the buttons are neither text nor images.
Looking into the JS-generated code via Firebug and comparing it to the JS output, I can see the following happening:
// whzzywig058.js, lines 124 to 127
if (buttonPath == "textbuttons")
butHTML='<button type=button onClick=makeSo("'+button+'")>'+ucBut+"</button>\n";
else butHTML='<button title="'+ucBut+'" type=button onClick=makeSo("'+button+'")>'+(btn[button]!=undefined?'<div style="width:'+btn._w+'px;height:'+btn._h+'px;background-image:url('+btn._f+');background-position:-'+btn[button]+'px 0px"></div>':'<img src="'+buttonPath+button+buttonExt+'" alt="'+ucBut+'" onError="this.parentNode.innerHTML=this.alt">')+'</button>\n';
w(butHTML);returns
// Output of above lines
// (Only one button, each result similar)
<button onclick="makeSo("redo")" type="button" title="Redo">
<div style="width: 16px; height: 16px; background-position: -192px 0px;"></div>
</button>As you can see, the background-image CSS property is filtered away by mysterious mischievous means. What is causing this?
The effect is the same with filtered Input, with full HTML input and regardless of theme preprocessing.
Is this a bug or how can I redo my config to solve the mentioned situation?
Best regard, osiris.
Comments
#1
... I got a similar problem not uploading image but using the direct link function... I can upload an image from my computer and then uploading it into the content.. But when I use the " Image address (URL): " function it doesn't fill no image into the text area....During the first operation it filled only the address, but now it is totally bugged..I got a 6.17 vs of Drupal... I hope someone can help me coz this editor is really user friendly and is perfect for my need... BY myself I can easily solve this problem using the html interface but my site's user must have an easy access way to put images into their news, and the direct link option is fondamental...
thkss
#2
I unintentionally denoted this request with the wrong title. (Fixed this in the meantime)
But your question can be helped, though.
While rechecking the js-code, I found that replacing
//whizzywig058.js, lines 77 to 80
if (imageBrowse) {
//replace the following original line
//w('<input type="button" onclick="doWin("'+imageBrowse+'&rtn=if_url'+idTa+'");" value="'+t("Browse")+'"> ');
//with this modified line
w('<input type="button" onClick="doWin(\''+imageBrowse+'&rtn=if_url'+idTa+'\');" value="'+t("Browse")+'"/>');
}
makes the image Browse function work (in Firefox 3.6.3 and Opera 10.60, other browsers untested).
#3
I will check this patch for next version.