Michlits, Mario (LNG-VIE) wrote:
>
> I am copying text containing line break characters at the end of each
> line from a web page into XML Mind. I have not found a method yet to
> search and replace these line break characters with spaces. Do you know
> any? Thank you in advance.
--> Yes, use normal search/replace, check toggle "Regular Expression"
and replace "\n" by " ".
--> Alternate, more elegant solution: copy text from the Web browser and
directly paste it as paragraphs (or another element).
To do this, please download and install add-on called "A customized
configuration for the DocBook DTD".
custom_docbook_config/mydocbook.xxe contains the following macro:
---
<!-- ================================================================
Converts the content of the clipboard to a list of paragraphs,
then inserts these paragraphs after selected element.
Replace parameter="%0" by:
* parameter="[blocks] %0", to convert multiple lines separated
by open lines to a paragraph. Without this option,
each non-empty line is converted to a paragraph.
* parameter="[systemSelection] %0", to copy text from system
selection rather than from clipboard (Unix/X11 only).
================================================================== -->
<command name="insertAfterAsParagraphs">
<macro>
<sequence>
<command name="makeParagraphs" parameter="%0" />
<command name="paste" parameter="after[implicitElement] %_" />
</sequence>
</macro>
</command>
<binding>
<keyPressed code="ESCAPE" />
<charTyped char="w" />
<command name="insertAfterAsParagraphs" parameter="para" />
</binding>
---
It is very easy to adapt it to document types other than DocBook.
It is based on command "makeParagraphs". See
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/makeParagraphs.html