Michael Wechner schrieb:
Andreas Hartmann schrieb:
Hi Lenya users and devs,
ATM the source editor removes namespace declarations from the document
source. I'd like to change this behaviour and make the document
editable in its original form for the following reasons:
* More transparency
* Allow to change namespace URIs
* Allow to use line and column numbers in validation error messages
(not possible at the moment because the displayed and actual XML are
different)
IMO the source editor is targeted towards seasoned users, so I think
showing them the source as-is doesn't do any harm.
BTW, in my sandbox I have added some JavaScript code which allows to
jump to the corresponding location when clicking on a validation error
message (not perfect yet, but I think this could be helpful). This
only works if the document is shown in its original form.
WDYT?
+1 it would be great to make this independent of Lenya using some
protocol for the data exchange such that this source editor could be
re-used within other applications/CMS
Yes, I also think that this would be a good idea. And I guess making the
source editor independent from Lenya would be much easier without the
special namespace handling.
Do think that's feasible with your sandbox code?
The code I'm working doesn't contain any changes regarding the
communication between the editor and the server, I only removed the
parts which hide the namespaces.
I already mentioned that Thomas and me have started (or rather, almost
finished) the integration of the Firedocs editor in Lenya. The
integration code is quite generic (based on AtomPub), I could imagine to
use it for the source editor as well. It would require some client-side
JavaScript to send/receive information when save/validate operations are
invoked.
The validation has to happen on the server side, so continuous
validation won't be easy to support. But I think we could provide a
"Save" button which sends the current content to the server, locks the
editing area until the response is received, and displays the result. WDYT?
I'd be happy to do some prototyping in this direction. IMO it would be
nice to have another app using the AtomPub interface. Would anyone be
interested in participating?
-- Andreas
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]