On 05/03/2013 04:57 PM, Fabián Mandelbaum wrote:
Hussein, thanks for your answers, my remarks between lines:

    An external application copying some XML to the clipboard for use by
    XXE must now declare the copied data as being "application/xml" (or
    "text/xml").

    In a nutshell, XXE 5.6.0 makes a difference between "text/plain" and
    "application/xml", while XXE 5.4.0 ignored "application/xml" and
    ``sniffed'' the "text/plain" in order the detect the case where this
    text was actually XML (starts with "<?xml ").


So, we're kind of stuck... because it's not easy (or even possible?)
from Javascript to copy stuff to the clipboard, much less being able to
specify the media type (text/xml, for example) of the copied object...

I'm sure there's a very valid and well thought rationale behind this
change, but this is a feature breaker for us...

We're currently investigating the possibility to implement a small java
applet that will perform this copy-to-clipboard function to replace the
JavaScript implemented feature on our UI, but having an applet (on an
otherwise html+css+javascript-ONLY UI) just for this is not a very
elegant solution.

Will keep investigating about JavaScript and the clipboard (which seems
rather dead because, mainly, security constraints).


Don't worry, I'm sure we'll manage to solve this problem *cleanly*. So please forget about hacks, at least for the moment.

I suggest to simply add a new scriptable method to the XXE applet.

References:

* http://www.xmlmind.com/xmleditor/_distrib/doc/configure/integrating_the_applet.html#applet_scripting

* http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmleditapp/applet/Applet.html

This new scriptable method would allow to execute any command on the active document view by passing to the applet a command name and a command parameter. This mechanism can be used to copy an XML fragment to the clipboard or to directly paste something into the active document view.

On your JavaScript side:

1) Do you currently use Scriptable methods?

2) If the answer is no, why no?

3) If the answer is yes, do you currently have any problem (e.g. JavaScript security) with this?







--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to