Page 1 of 1
Pasting into verbatim blocks
Posted: Thu Mar 10, 2005 5:44 am
by dnedrow
Currently, when I paste text into a verbatim block (e.g. programlisting), oXygen re-aligns everything in the pasted block.
I'd like to see the whitespace preserved only when pasting into verbatim areas.
-David
Posted: Fri Mar 11, 2005 10:37 am
by sorin_ristache
Hello,
You can control this with the option "Indent on paste" in Preferences - Editor - Format. If this option is set to false the pasted block will not be realigned but the exact copied content will be preserved.
Regards,
Sorin
Posted: Tue Mar 29, 2005 9:57 pm
by dnedrow
The drawback to using "Indent on paste" is that it disables all indenting for pasted text, both for <programlisting/> and regular text that I would like to have indented.
-David
Posted: Wed Mar 30, 2005 11:20 am
by george
Hi David,
The next release of oXygen will provide an action for intenting the current element that will take into account the xml:space attribute and the list of elements for which spaces should be preserved. You should be able then to paste then call the format element action on the parent elemnent to format and indent the pasted content. Otherwise it is hard to implement the paste action itself to be aware of xml:space and of the spaces preserve elements list as the pasted content is any text in the document and can span multiple elements.
Best Regards,
George