[All Adaptavist Apps]

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{excerpt}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.{excerpt}

h2. 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 accurately rendered in your wiki page.

{note:title=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.
{note}

h2. Confluence 2.8 and above

To add the "Edit in Word" link to your menu, use the following notation:

{code}

Excerpt

WordDAV allows editing of wiki pages from within Microsoft Word.

Word/DAV provides two links for general use.
The first is "Edit in Word", following this link will open up Microsoft Word if you have installed. You will then be prompted for your username and password. Once authenticated Word will open with the pages content allowing you to edit and save from within Word itself.
The Second is "Doc Import", this link allows you to upload existing Word documents as content for you wiki-pages.

compound-menuitem macros for Word/DAV

For confluence version 2.8 and greater

The code below adds an "Edit in Word" link.

Code Block
{compound-menuitem:webui
                  |location=system.content.action/primary
                  |key=editinworditem3
                  |icon=/download/resources/com.benryan.confluence.wordplugin:editinworditem3/editinwordblue.png
                  |caption=Edit in Word}

The code below adds a "Doc Import" link.

Code Block
{code}

(on) *Tip:* You can use any of the [menu icons|Builder 3.x Icons] available in Theme Builder if preferred.

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

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

For confluence version < 2.8

The code below adds an "Edit in Word" link.

Code Block

h2. Confluence 2.7 and earlier

To add the "Edit in Word" link to your menu, use the following notation:

{code}
{compound-menuitem:webui
                  |location=system.page.actions
                  |key=editinworditem1
                  |icon=/download/resources/com.benryan.confluence.wordplugin:editinworditem1/editinword.png
                  |caption=Edit in Word}

The code below adds a "Doc Import" link.

Code Block
{code}

(on) *Tip:* You can use any of the [menu icons|Builder 3.x Icons] available in Theme Builder if preferred.

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

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

Adding the links to builder edit menu.

On the administration console, choose manage layouts.
Image Removed

Create a new layout, I've called this one WordDAV.
Image Removed

Click on the menu's tab.
In the section titles Menu Shorcut Macros, click on the Edit button.
Image Removed

Click on the Edit Menu tab.
Choose the appropriate set of commpoun-menuitem macros based on the version of confluence you are using.
Add these macros to the EditMenu code. Press okay.
Image Removed

...

{code}

h2. Adding the links to the Edit menu

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

!MenuShortcutMacros.png|align=center!

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

!EditMenuAddTheWordDAVlinks.png|align=center!

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 {menuicon:disk_blue} button - see [Layout Manager] for more details) and you should see the new links appear in the Edit menu.

h2. 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:

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