Hi all,
Firstly, I'm new to the FCKeditor and even more so to this forum, so I hope I'm not flogging a dead horse here, or otherwise going against the grain of the forum. If so: I'm sorry, and then I hope someone can point me out where to go.
Well then, with that out of the way, my actual question may or may not have already been treated here, but I couldn't find it so far. What I would like to do is to create a web-based editor (which doesn't necessarily has to work in all browsers, but at least in either IE or in Firefox) for creating a custom XML format. The FCKeditor comes very close to the functionality I'd like to achieve, and basically what I'm looking for is a slightly(?) adapted version that perhaps uses different custom buttons for the tags I need to create (a la the current buttons for e.g. "bold", "italic", "underline", etc.)
As for the XML: The format is rather straightforward, and I do have a DTD as well as an XSLT for it, and at the end of this item, I have posted a "lorem ipsum" sample of the format the editor would have to be able to create. Server side wise, I can set-up a machine that will be dedicated for this application, this may be a Windows machine, or a Unix one, but in either case it will be equipped with a recent PHP 4 (and possibly PHP 5) installation.
Now, I've taken a look at the FCKeditor (v2.4.3) source code, and I'm pretty much at a loss as to how to best achieve this (if possible maintaining compatibility with potential upgrades of the FCKeditor!)...
Can anyone tell me the following?:
1-Can the FCKeditor indeed be modified/manipulated/used/configured such that it can generate custom XML formats like the format listed below, or will this be about as "easy" as trying to crack an RSA encrypted piece of code without the proper keys?
2-If the answer to question 1 is positive, can someone tell me where (i.e. in which parts of the code/scripts) and how to best make changes/additions in the code?
3-If the answer to question 1 is negative, can someone tell me if they know of a good alternative (not necessarily web based, but preferably free or at least not very expensive)?
4-Has anyone of you got some experience in making similar changes/additions?
5-Other things of interest/importance I left out?
Thanks a lot in advance, and hopefully someone can help me further!
Cheers,
Olafo
Sample XML format:
<artikel><kop><k>Lorem ipsum dolor sit amet</k>
<sk>Lorem ipsum</sk>
</kop>
<bodytekst><inl1><a>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus velit libero, pharetra id, elementum nec, congue ut, massa. Duis accumsan vestibulum tortor.</a>
<a>Ut magna. Aenean diam nunc, luctus vitae, egestas vel, interdum nec, risus. Curabitur metus pede, gravida eget, volutpat quis, accumsan nec, nibh.</a>
</inl1>
<inl2><a>Sed nisl. Etiam quam leo, iaculis ut, ultricies eget, tempor eu, nunc. Integer libero mi, ullamcorper eu, aliquet vel, iaculis eu, mauris.</a>
</inl2>
<p><sp><spk>Lorem</spk>
<a>Suspendisse potenti. Cras placerat auctor risus. Vestibulum metus diam, sagittis non, lacinia ultricies, ullamcorper quis, mi. Vestibulum dignissim risus vel libero.</a>
<a>Fusce convallis consectetuer ante. Nulla facilisi. Donec sapien metus, consectetuer et, placerat ut, tempus ut, magna.</a>
</sp>
<sp><spk>Ipsum</spk>
<a>Praesent ultrices <lexicon term="elementum ipsum">metus diam</lexicon>. Proin tristique eros quis ipsum. Nulla vel justo vehicula magna pellentesque elementum. Nam leo augue, fringilla ac, sodales eu, dictum quis, metus. Donec massa.</a>
</sp>
<sp><spk>Dolor sid amet</spk>
<a>Pellentesque imperdiet, arcu non tristique interdum, lectus mauris sollicitudin diam, sed aliquet ante tortor dignissim diam.</a></sp>
</p><vs><o><vskop>Verwante artikelen</vskop>
<oi><link url="a02">Ultricies eget</link></oi>
<oi><link url="../h/h05">Auctor risus</link></oi>
<oi><link url="a05">Cras placerat</link></oi>
<oi><link url="../h/h07">Sed aliquet</link></oi>
</o></vs></bodytekst><advies><advieskop>Ons advies</advieskop>
<a>Aenean vitae mauris nec quam pulvinar commodo. Vestibulum rhoncus volutpat elit.</a>
</advies>
<tabel item="g01" type="op"/><tabel item="g01" type="so"/><tabel item="g01" type="do"/><tabel item="fs" type="g01"/></artikel>
Thu, 08/16/2007 - 16:33
#1
Re: How to create custom XML using FCKeditor?
The main problem is that the source will be parsed by the browser, so that source must be properly parsed without messing with it and self closing elements are usually the weakest point.
Start using that XML inside an html document and try to use a stylesheet (CSS not XSLT) to display that content as you want. If you are able to do that, then you can keep on trying FCKeditor.
But then, creating elements like it's done with the Bold, Italic.. buttons will be harder, at least by the moment. Once 2.5 is released (it's getting delayed a little...) it might be easier, but you are always on the edge of what's possible and what's outside the scope of the editor.