4. The XHTML menu

Paste As
Paste from Word Processor or Browser

Import the HTML copied to the clipboard by word processors or web browsers and intelligently paste it into the XHTML document being edited.

  • Extensive efforts are made to decently support the “non-filtered HTML” copied by MS-Word to the clipboard.

  • When an application other than MS-Word is used, the quality of the result you'll get in XXE highly depends on what has been copied to the clipboard. In all cases, XXE tries very hard to import something simple, clean and valid at the expense of the fidelity to the original data.

The pasted data replaces the text or node selection if any. When there is no selection, XMLmind XML Editor automatically determines a valid insertion location at or following the caret position.

If XMLmind XML Editor fails to find such valid insertion location, the rich text is converted to valid XHTML and then copied to the clipboard, overwriting the original data put there by the third-party application. This allows to use the “normal” Paste Before, Paste or Paste After commands to paste the data elsewhere in the document.

[Tip]

This menu entry allows not only to paste snippets copied from word processors or web browsers, but also to import entire documents or HTML pages. In order to import the entire document into XXE:

  1. Open the document in the third-party application.

  2. Press Ctrl+A (Select All) then press Ctrl+C (Copy) to copy it to the clipboard.

  3. Create a new XHTML document in XXE by using FileNew.

  4. Use FileSave As to save this new XHTML document to disk.

  5. Explicitly select the root element of the XHTML document, for example by clicking on its name in the node path bar.

  6. Select menu item "Paste from Word Processor or Browser" to paste the content of the clipboard[5].

[Tip]

If, using MS-Word, you want to copy a piece of text rather than a paragraph, do not include the hidden character found at the very end of a paragraph (the paragraph mark) in your selection.

Other menu entries

The entries of this submenu allow to paste the plain text copied to the clipboard, typically using a third-party word processor or spreadsheet, as:

  • one or more paragraphs,

  • OR a pre element,

  • OR one or more list items,

  • OR an itemized list,

  • OR one or more table rows,

  • OR a table.

The last two menu entries assume that each text line specifies a table row and that, within a text line, the contents of the table cells are separated by tab characters.

[Tip]

If you need to paste the copied text as an ordered list, first paste this text as an itemized list then convert the pasted list to an ordered list using EditConvert (Ctrl+T).

The following entries of this submenu allow to paste the image copied to the clipboard as:

  • img,

  • div (containing an img)

  • figure (XHTML5 only).

Menu entry "img" replaces the text or node selection if any. When there is no selection, this menu entry pastes its element at caret position (just like EditPaste).

All the other menu entries also replace the text or node selection if any. When there is no selection, these menu entries paste their elements at any valid position in the document following the caret position.

Move Up

Move selected element up, that is, swap it with its preceding sibling node. Requires the element to be explicitly selected.

Move Down

Move selected element down, that is, swap it with its following sibling node. Requires the element to be explicitly selected.

Preview Settings

Displays a dialog box which may be used to specify one or more CSS stylesheets to be automatically added to the preview.

This feature is useful when you use XXE to edit some “pure XHTML contents” (e.g. the text of an article) and want to see how it will look like once published. This feature is not useful when you use XXE to edit a self-contained HTML page, as this kind of page is expected to contain style elements and/or links to its own set of CSS stylesheets.

Only the stylesheets for which the checkbox found in front of the CSS URL is checked will be added to the preview. For example, in the case of the above figure, "file:/C:/src/9xxe/doc/resources/xmlmind.css" will be added to the preview[6], not "http://www.xmlmind.com/xmleditor/xmdecor/xmlmind.css".

[Note]Safari users

Unlike all the other browsers, adding "file:/" CSS stylesheets to the preview will not work unless you first enable the Developer tools (Preferences, Advanced tab, check "Show Develop in menu bar").

Preview

Preview the document being edited using the “default viewer” helper application. The default viewer is typically a Web browser. This helper application is specified in the Preferences dialog box, Helper Applications section, Default viewer field.

Note that this command automatically creates a temporary preview file in any of the following cases:

  • Some CSS stylesheets are to be automatically added to the preview. See above command.

  • The XHTML document to be previewed contains XIncludes. XIncludes are transcluded in the temporary preview file.

  • Save option favorInteroperability in XMLmind XML Editor - Configuration and Deployment is turned on, which is the case by default, and the XHTML document to be previewed contains processing instructions. Processing instructions are removed from temporary preview file.

[Tip]

If you want to preview the document being edited as is, do not use XHTMLPreview. Instead please use ToolsHelper ApplicationOpen Document in Helper Application.

Check External References

Checks all the links to external resources found in the document being edited. All kinds of external resources are checked for existence: images, audio, video, PDF documents, HTML pages, etc. When the resource is an HTML page and the link ends with a fragment (e.g. "#bar" in "../doc/foo.html#bar") then this fragment is also checked for existence.

4.1. Convert Document sub-menu

Convert to RTF (Word 2000+)

Converts the document being edited to RTF (Rich Text Format) using XMLmind XSL-FO Converter (see http://www.xmlmind.com/foconverter/). The document generated by this command can be edited and printed using Microsoft® Word 2000 and above.

Convert to WordprocessingML (Word 2003+)

Converts the document being edited to WordprocessingML using XMLmind XSL-FO Converter. The document generated by this command can be edited and printed using Microsoft® Word 2003 and above.

Convert to Office Open XML (Word 2007+)

Converts the document being edited to Office Open XML (.docx file) using XMLmind XSL-FO Converter. The document generated by this command can be edited and printed using Microsoft® Word 2007 and above.

Convert to OpenDocument (OpenOffice.org 2+)

Converts the document being edited to OpenDocument (.odt file) using XMLmind XSL-FO Converter. The document generated by this command can be edited and printed using OpenOffice.org 2 and above.

Convert to PDF

Converts the document being edited to PDF (Adobe® Portable Document Format, also known as Acrobat®) using RenderX XEP (see http://www.renderx.com/), if its plug-in has been installed, and Apache FOP otherwise (see http://xmgraphicsl.apache.org/fop/).

All the above Convert commands display the URL chooser dialog box rather than the standard file chooser dialog box. That is, you must specify the URL (Uniform Resource Locator) of a save file.

Note that these commands can create directories on the fly, if needed to. For example, if you specify http://www.acme.com/docs/report43/mydoc.pdf as the URL of the save file and if directory report43/ does not exist, this directory will be created during command execution.



[5] Note that Ctrl+V, that is, the plain EditPaste command, would not work here.

[6] A <link rel="stylesheet" href="file:/C:/src/9xxe/doc/resources/xmlmind.css"> element will be added in the head element just after the title element.