I am trying to get this WYSIWYG editor working .... but am failing deparately.
Initially, I tried just installing the CKEditor ... it worked, and I could format text ... but there was no image upload. So, I searched around and some people said they got it working with the following modules: WYSIWYG (using the ckeditor), IMCE, IMCE Wysiwyg API bridge. Everything seemed to install fine ... I went and added some content, uploaded and an image (and it appeared fine in the editor), and then hit save and viewed the page. However, the image ends up being broken.
When checking the code ... it looks like this...
<p><img alt="\"OurShift\"" src="\"/sites/default/files/imagehome.jpg\"" style="\"border-top-width:" border-right-width:="" border-bottom-width:="" border-left-width:="" border-top-style:="" solid="" border-right-style:="" border-bottom-style:="" border-left-style:="" width:="" height:="" /></p>
Note all the extra characters that the editor added in. For example alt="\"OurShift\"" should just be alt="OurShift". I checked, and had the content set to FULL HTML (so it shouldn't be parsing the content).
I really need to get this working, as not having any images on my site is an EXTREME problem. Please help!!!
Comments
Comment #1
dczepierga commentedU are using WYSIWYG module not CKEditor module, so i move this to correct tracker.
Greetings
Comment #2
twodHmmmm.... IMCE manages the whole uploade/storage part on its own (independent from Wysiwyg) and since it seems like it's returning a correct path to the uploaded file, I don't think anything's wrong with it.
IMCE Wysiwyg bridge just takes care of opening the IMCE dialog and putting the returned URL into the editor's image dialog's URL-field, which also looks ok.
It's then the responsibility of the editor's own image plugin to create the img tag you're seeing. Since the image appeared in the editor, at least initially, that should be fine too.
The markup you posted looks way off though.
The style attribute should not have any = signs next to the : either.
Is this markup what appears if you click "Disable rich text" below the editor? Does the image still appear in the editor if you go back and edit the node?
If the markup only looks bad when viewing the source of the rendered node, the problems are caused by one or more of the filters enabled on the "Full HTML" format. The formats are really only collections of enabled filters to be run during rendering, what they're named makes no difference.
Comment #3
jabbamonkey commentedWell, now I have another problem. I also noticed that any quotes that I was putting into regular text fields (like the title text field) were also being converted to \' ... so it's not just the textfield with the WYSIWYG editor. So, I wanted to track down the problem, and I disabled all the plugins down to the core ... and it was still happening.
Grrrrrrrrr. So, I can probably say it isn't a module. Any idea what else it can be?
Then, I added my modules back in ... and now the WYSIWYG editor doesn't even appear in my body text areas (even if I have permissions set, FULL HTML is selected, with buttons chosen). It's just a plain text area field ... (and the quotes still get converted when I submit the form)
Comment #4
jabbamonkey commentedSo, I did some searching around... it seems there is a PHP addslashed() function going on somewhere...
http://php.net/manual/en/function.addslashes.php
Would it be wise to find it and take it out? (probably not). Any idea where to look for this?
Or, if you have a better solution, please let me know.
Comment #5
jabbamonkey commentedOr, if not take it out .... to create a function that does stripslashes(); whenever a field is posted...
http://www.php.net/manual/en/function.stripslashes.php
I'm not a PHP programmer. Anyone have an idea where to do this?
Comment #7
twodFor reference, the slashes issue is in #1269440: Form submitting quote changes to slash quotes - possible workaround?. Sorry I didn't reply here. If the original problem here also goes away when your host disables magic quotes, please mark this fixed.
Comment #9
twodI'm going to assume this was fixed. Please reopen the issue otherwise.