I think this one should have a simple solution, I must be dumb.
Just integrated the editor. Works fine, until you try to insert a tag containing attributes as the double quotes interfere with the value="" attribute of the editor input field.
This is basic functionality, so why is it happening?
Thanks for helping.
Just integrated the editor. Works fine, until you try to insert a tag containing attributes as the double quotes interfere with the value="" attribute of the editor input field.
This is basic functionality, so why is it happening?
Thanks for helping.
Re: Double quotes in tag attributes error (any help is appreciat
I have been combing this forum for hours trying to find a solution and have tried all sorts of filtering and encoding to get all of the message area saved to database. I can remove the single and double quotes easy enough but when the page is re-edited by FCK it puts the double quotes back again where it thinks they belong (not where we want) and jumbles the code because it insists on adding unwanted tags like alt="" back into the code... the result is a messup.
In fact if the alt="" tag wasn't forced onto every image, I could have gone home a long time ago.
I would also like to see the font sizes in pt as in 8pt, 10pt, etc or even 1,2,3... not big, bigger, bigger again!
Anyways, we have spent the last couple of days integrating FCK into a project that is soon to be released [purchasing a developer licence] but if we can't resolve these issues soon we'll have to find find something more robust.
Is fckconfig.js the only file to edit for this? Is there somewhere else where I can remove ALT tags completely?
Re: Double quotes in tag attributes error (any help is appreciat
Hi William!
Great to see I'm not the only one with this problem but strange that we're still the only two. We must be doing something wrong I'd say!
I was working with Innova editor and still use it in my projects. I wanted to try out FCK for the uniform campatibility it has. But haven't got it to work properly yet. I don't understand why they use an input field instead of a text area, which would clear this problem. Or am I seeing/implementing it completely wrong?
Anybody who might help us with this?
Re: Double quotes in tag attributes error (any help is appreciat
I resolved the ALT tag issue by adding a value for it. Then when FCK adds the quotes again, the html code is correct.
I did have another issue with an unwanted "> appearing on the preview page but using an invisible textarea to hold the FCK data instead of a hidden text field solved that problem.
Re: Double quotes in tag attributes error (any help is appreciat
Set the FCKeditor page to send to a preview page which in turn then submits to the database. Then you have the freedom to do anything you want with the data before saving.
On the preview page I used a hidden textarea to hold the FCK data while displaying the html separately for a preview.
Re: Double quotes in tag attributes error (any help is appreciat
Use any of the server side integration samples, you don't need to care about how the data is available in the page, you just use an object and set the value with the initial HTML that you want and then call the method to generate all the html to really create the FCKeditor instance. The server integration will take care of escaping the data and generating everything correctly.
Just make sure that your page is valid HTML. If you are generating invalid HTML (for example, using the textarea replacement method but not html-escaping the data inside the textarea, or using directly a javascript object but not escaping the string according to javascript syntax rules), then the browser will parse your data incorrectly and there's no magic after that. FCKeditor can read only the data provided by the browser.
Re: Double quotes in tag attributes error (any help is appreciat
I'm uploading an image first and then loading it into FCK editor from a selection of templates.

The image shown is only a token for a preview as the actual image shown to the public cannot be displayed in FCK html because it's encrypted.
So yes, it is complicated but no more than needed in this instance.
So far it's looking good
Re: Double quotes in tag attributes error (any help is appreciat
An empty alt for an image isn't the best option with regards to accesibility of your site, but it shouldn't create any problem to the processing.
That comment about an "> in the preview area and hiding the data and then resending it again are symptoms that there is some problem in your application, so instead of hiding it, you should stop, take a moment of rest and start from scratch, review the samples and you'll see that integration FCKeditor is very easy, there's no need to do double postings to the server.
Re: Double quotes in tag attributes error (any help is appreciat
Re: Double quotes in tag attributes error (any help is appreciat
Alfonso,
I totally agree with your point.I'm therefore only trying to get the functionality to work as intendend. Somehow doble quotes are not converted by php? I think.
This is my implementation:
Re: Double quotes in tag attributes error (any help is appreciat
I found this to be very strange...
In the PHP5 file you have this function:
You can see I placed an echo in front of the htmlspecialchars funtion, strangely that produces this output:
While in my page source I see this code:
Something wrong right? BTW I haven't changed the PHP5 file, other than the echo function for debugging purposes.
I think we should be close.
Re: Double quotes in tag attributes error (any help is appreciat
Got it!
(i meant, hope this helps)
Own stupid fault....was reversing the work done by htmlspecialchars.
Don't think anyone else will be dumb enough to do this, but if you do...shame on you