Using FCK in Firefox (1.0.4) when using the the bold and italic buttons for example the code created uses the <b></b> and <i></i> structures instead of the <strong></strong> and <em></em> structures.
I have oFCKeditor.GeckoUseSPAN = false; so I solved the SPAN problem but now would like the standards compliant code and not the deprecated code.
Does anyone know where I can change this in the source files? I've done searches on the code but couldn't come up with anything.
I really like this piece of software and would like to contribute if at all possible - maybe making this change if someone could point me in the right direction at all. I'm limited in Javascript experience but would like to give back somehow.
Thanks
I have oFCKeditor.GeckoUseSPAN = false; so I solved the SPAN problem but now would like the standards compliant code and not the deprecated code.
Does anyone know where I can change this in the source files? I've done searches on the code but couldn't come up with anything.
I really like this piece of software and would like to contribute if at all possible - maybe making this change if someone could point me in the right direction at all. I'm limited in Javascript experience but would like to give back somehow.
Thanks
RE: Would like XHTML tags instead of <b>,<i>
Would be weird that the Gecko engine (developers) put in the deprecated code and the IE developers dropped in the "right" code.
RE: Would like XHTML tags instead of <b>,<i>
Basically instead of finding the spot in the js files I'm using regular expressions to find and replace the instances in a PHP file which processes the contents of the forms.
The general structure of the PHP is like so (in case anyone wants the properly formatted structures in Gecko based browsers):
$text = $_POST['MyTextarea'];
$pattern = array('/<b>/','/<\/b>/','/<i>/','/<\/i>/');
$replace = array('<strong>','</strong>','<em>','</em>');
$new_text = preg_replace($pattern, $replace, $text);
I'm not sure how "proper" that is but it's doing the trick right now. I'd still like to know if anyone has a direct solution in the js files which would prevent me from adding this to all my processing scripts.
Thanks.
RE: XHTML tags (Fred pls confirm)
Fred, can you please confirm this?
RE: Would like XHTML tags instead of <b>,<i>
Long answer... you can do the same thing you're doing with PHP in JS. (yea, it has regular expressions).
Add a js function that does what you want 'on submit' or some such... OR YOUR OWN CUSTOM BOLD BUTTON!
wow. Guess that would work as well. Hrm. Hadn't really thought about that. The HR one was right there but bold, who would think of bold?
Eh. I'm going away for a while. Hope All is Well, good luck to all! MTFBWYA!
RE: Would like XHTML tags instead of <b>,<i>
If what bnoblet stated is true, the problem is in the Gecko engine with it's editable area and that'd be fine. My work around is working for now.
I'm pretty new to the whole Javascript area so figuring out exactly where to edit etc to create my own button seemed like more work to me then I had to devote at the time. But thanks for the sarcastic laden comment.
RE: Would like XHTML tags instead of <b>,<i>
Wasn't sarcasm. And it's more of El Den than LaDen. Ha!


I hadn't thought about the custom plugin solution. Kind of a hack, as it's WAY nifty-er to use the nodes and whatnot.
So sorry to think aloud- er, type aloud like that.
^--- sarcasm, one liner
I see how it could come off that way, I didn't mean it like that tho, it was right off the top of my head while I was typing and the CAPS MEANT EXCITEMENT not SARCASM.
Good luck, sorry for the non-clarity!
And I'm off!
VACATION!!! WOOT WOOT!!!
RE: Would like XHTML tags instead of <b>,<i>
Okay, thanks for clearing that up. Have a good vacation
RE: Would like XHTML tags instead of <b>,<i>
Enjoy your vacation Xenden
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn