[All Adaptavist Apps]

Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 60 Next »

The Office Connector (also known as Word/DAV plugin) allows you to import from or edit pages in popular word processing applications such as MS Word and Open Office Writer. This tutorial shows how to add navigation links to these features.

Overview

The "Edit in Word" feature allows you to edit a wiki page using popular word processing applications. When you click the link, the page will open in the word processor (you'll sometimes be asked to log-in while doing this) and when you've made your changes simply save the document and the wiki page will be updated (you'll have to refresh the wiki pages to see the changes take effect).

The "Doc Import" feature allows you to import a word processor document in to a wiki page. This is useful when you have documents that contain formatting that's not possible using wiki markup - the document will be rendered in your wiki page as close as is possible to the original, but not nessecarily exactly the same.

Important

The code snippets below have been split on to multiple lines to make them easier to read. When you are adding them to your theme layout please remember to put everything on a single line.

You must have the plugin installed before you can use these features. Also, please note that the links are different depending on your version of Confluence.

Edit In Word macro

The Office Connector plugin has a handy macro that you can drop in to any theme panel to add an "Edit in Word" link:

{editinwordlink}

You can see some examples in the Office Connector Support FAQ.

Confluence 2.8 and above

The way that the edit in word link is generated by the office connector code is not compatible with the builder menu system, to work around this we have duplicated and refined the office-connector's code and included it within builder (not the connector itself, but the code that calls it), to use the edit in word feature in a builder menu you will need Builder 3.3.0 or later and use the following syntax

{compound-menuitem:editInWord|icon=word|caption=Edit this %page% in word...}

Tip: You can use any of the menu icons available in Theme Builder if preferred.

To add the "Doc Import" link to your menu, use the following notation:

{compound-menuitem:webui
                  |location=system.content.action/secondary
                  |key=importworditem1
                  |caption=Doc Import}

Confluence 2.7 and earlier

The way that the edit in word link is generated by the office connector code is not compatible with the builder menu system, to work around this we have duplicated and refined the office-connector's code and included it within builder (not the connector itself, but the code that calls it), to use the edit in word feature in a builder menu you will need Builder 3.3.0 or later and use the following syntax

{compound-menuitem:editInWord|icon=word|caption=Edit this %page% in word...}

Tip: You can use any of the menu icons available in Theme Builder if preferred.

To add the "Doc Import" link to your menu, use the following notation:

{compound-menuitem:webui
                  |location=system.page
                  |key=importworditem
                  |caption=Doc Import}

Adding the links to the Edit menu

Go in to the Layout Manager and click on the Menus Tab:

Click on the "Edit" button in the "Menu Shortcut Macros" section and then click on the "Edit Menu" tab of the window that appears:

Add the appropriate macros based on the version of Confluence you are using (see above) and then click the "OK" button to confirm the changes.

Save your layout (click the

Unknown macro: {menuicon}

button - see Layout Manager for more details) and you should see the new links appear in the Edit menu.

Adding text hyperlinks (outside of a menu)

To add text hyperlinks outside of a menu, eg. in a sidebar, just add the "flat=true" parameter to the compound-menuitem macro, for example:

{compound-menuitem:webui
                  |location=system.content.action/primary
                  |key=editinworditem3
                  |icon=page_white_word
                  |caption=Edit in Word
                  |flat=true}
  • No labels