Author Mode: Insert element clobbers Copy/Paste clipboard

Are you missing a feature? Request its implementation here.
reinierk
Posts: 36
Joined: Tue Feb 21, 2012 8:22 pm
Location: Rotterdam, the Netherlands
Contact:

Author Mode: Insert element clobbers Copy/Paste clipboard

Post by reinierk »

Author Mode:
I find it very annoying that when you insert an element into a document the clipboard is changed.
I find myself often selecting a piece of text that I want to paste into my document. When I want to insert it I discover that I first need to add an <P> into the document. When I have done this the clipboard is wiped and a single "p" is inserted!
Can you change the code for element insertion to store the original clipboard somewhere, and restore the clipboard after inserting the element?
How to reproduce:
  • Select some text.
  • In Author mode insert a P element.
  • Paste what you selected with CTRL-V.
Keep up the good work! It is still an excellent tool!
Kind Regards,
Reinier Kleipool,
Course Materials editor,
Open Source Academy
http://www.OpenSourceAcademy.eu
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Author Mode: Insert element clobbers Copy/Paste clipboard

Post by adrian »

Hello,

What version of Oxygen are you using (check in Help > About) and on what platform (Windows, Linux, Mac)?
What type of document are you editing (DocBook, DITA, custom)?

By what means do you insert the P element in Author mode?
I'm asking because there are a lot of ways to insert an element:
- press ENTER and choose the element from the list
- double click the element in the Elements view
- custom action from contextual menu/toolbar or shortcut key.

I've tried most of these but did not lose the content of the clipboard, so I can't seem to reproduce this (Oxygen v14.1 on Windows 7).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
reinierk
Posts: 36
Joined: Tue Feb 21, 2012 8:22 pm
Location: Rotterdam, the Netherlands
Contact:

Re: Author Mode: Insert element clobbers Copy/Paste clipboar

Post by reinierk »

I have more information:
This only happens when I am filling a dita document generated from a template. I use a template that has a placeholder for an image that is pre-filled with href="images/slides/u00-slide00x.svg"

As long as I do not set the image href to a valid location you cannot paste! For some reason each time you make the Oxygen window the active one in order to paste, the cut/paste buffer gets overwritten with the invalid href value!

Why is this happening? Yes, I do know that the href is invalid: There is a large red box on the page! But this should not mess-up cut/paste until I correct the issue...

oXygen version: XML Editor 14.2, build 2013030817
Kind Regards,
Reinier Kleipool,
Course Materials editor,
Open Source Academy
http://www.OpenSourceAcademy.eu
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Author Mode: Insert element clobbers Copy/Paste clipboar

Post by adrian »

Hi,

On what platform (Windows, Linux, Mac) are you running Oxygen?
The platform is important. Linux for example can have two independent clipboard buffers: X11 clipboard (Edit > Copy/Paste) and Gnome/GTK clipboard (select to copy, mouse middle click to paste).

How are you copying the content from outside Oxygen (Edit > Copy/Ctrl+C action or do you just select it)?
How do you paste the content inside Oxygen (Edit > Paste/Ctrl+V action or do you just press mouse middle click) ?

Do you have text selected in Oxygen when you activate its window?
If you do, have you tried clearing the selection prior to pasting?

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
reinierk
Posts: 36
Joined: Tue Feb 21, 2012 8:22 pm
Location: Rotterdam, the Netherlands
Contact:

Re: Author Mode: Insert element clobbers Copy/Paste clipboar

Post by reinierk »

Hello Adrian,

The set-up is as follows:
Oxygen on a CentOS 6.4 Linux machine. oXygen version: XML Editor 14.2, build 2013030817.
X11 output on a Windows 7 machine via Xming 7.5.0.58. Xming command line:

Code: Select all

"D:\Program Files (x86)\Xming\Xming.exe" -ac -multiwindow -clipboard -lesspointer -swcursor
Watch the -clipboard option! Cut/Paste works fine in all situations:
Linux / Linux for example Linux Inkscape to/from Linux oXygen.
Windows / Linux for example: Windows FireFox to Linux oXygen. Linux oXygen to Windows Firefox location bar.

The problem only occurs when you have a faulty href attribute in a image tag in oXygen. You have to switch windows to oXygen in order to paste. At the switch the paste buffer gets overwritten with the href value. In this situation you can still cut/paste from oXygen to destinations outside oXygen on both Linux and Windows...

Workaround: Point the href to something valid, and the problem goes away!

The way you Paste does not seem to matter: SHIFT+INS, CTRL+V or the menu all give the same result.

Looks to me that the error generating code uses the clipboard and messes-up what is on the clipboard at that time.
Kind Regards,
Reinier Kleipool,
Course Materials editor,
Open Source Academy
http://www.OpenSourceAcademy.eu
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Author Mode: Insert element clobbers Copy/Paste clipboar

Post by adrian »

Hi,

If you believe the invalid href is the cause of the problem, please send us a sample file and instructions about how we can reproduce the problem. Please send it to: support AT oxygenxml DOT com.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
reinierk
Posts: 36
Joined: Tue Feb 21, 2012 8:22 pm
Location: Rotterdam, the Netherlands
Contact:

Re: Author Mode: Insert element clobbers Copy/Paste clipboar

Post by reinierk »

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<?xml-stylesheet type="text/css" href="file:/home/reinierk/OxygenXMLEditor/osa/Customization/css_classed/osa.css" title="OSA Course" alternate="yes"?>
<concept id="concept_r2s_2zd_kk" xml:lang="en-GB" product="RedHat/CentOS SuSE Ubuntu" props="lpic-1">
<title>Multipathing</title>
<shortdesc>Multipathing is used to load-share and for resiliency in a SAN.</shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm>Multipathing</indexterm>
</keywords>
</metadata>
</prolog>
<conbody>
<p><image id="image_s2s_2zd_kk" href="images/slides/u0x-slide00y.svg" outputclass="osa/slide"
/></p>
<p>Please paste something here:images/slides/u0x-slide00y.svg</p>
</conbody>
</concept>
Kind Regards,
Reinier Kleipool,
Course Materials editor,
Open Source Academy
http://www.OpenSourceAcademy.eu
reinierk
Posts: 36
Joined: Tue Feb 21, 2012 8:22 pm
Location: Rotterdam, the Netherlands
Contact:

Re: Author Mode: Insert element clobbers Copy/Paste clipboar

Post by reinierk »

A similar thing happen when you have something on the clipboard but before you want to paste you first need to add an element to a file. If you press ENTER and select a P element just before the paste you get "Split P" in stead of the clipboard contents.
This is just annoying and easy to work around. But I think it has the same source for a problem.
Kind Regards,
Reinier Kleipool,
Course Materials editor,
Open Source Academy
http://www.OpenSourceAcademy.eu
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Author Mode: Insert element clobbers Copy/Paste clipboar

Post by adrian »

Hi,

Apologies for the late reply.

I've submitted this for investigation.
I have some doubts regarding Xming+Java from previous experiences, but we'll have to test this out before we can jump to any conclusions.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
reinierk
Posts: 36
Joined: Tue Feb 21, 2012 8:22 pm
Location: Rotterdam, the Netherlands
Contact:

Re: Author Mode: Insert element clobbers Copy/Paste clipboar

Post by reinierk »

Tried it in a 100% Linux X11 Desktop environment on the Linux GUI console.
Pasting is possible with href errors on the page.
The "validation errors" dialog pops up, but you can select "Paste as plain text"
then it works
Kind Regards,
Reinier Kleipool,
Course Materials editor,
Open Source Academy
http://www.OpenSourceAcademy.eu
Post Reply