You can add extra buttons to the toolbar of the Multi-Channel Text Editor and link them to specific functionality.
Example: You can add a button to add words to a dictionary, send words to a Web site for translation, open an often used Web site, send the article to a Server plug-in for processing, and so on.
Custom buttons are added to the right of the default buttons in the toolbar.
Figure: Custom buttons are added to the right of the default buttons. (A) A custom button for opening Wikipedia.
How actions are provided
The action that is performed when the button is clicked should be provided in the form of a script (this can be any file such as a .php file), an Enterprise Server plug-in, or an external Web site.
Where to get actions from
The actions need to be created or obtained yourself; they are not provided by WoodWing (although sometimes actions are made available on WoodWing Labs).
Tip: Use the Content Station forum to ask the Community if the scripts that you are after already exist.
Configuration
Custom buttons for the Multi-Channel Text Editor are added by defining them between the <EditorToolbarActions> </EditorToolbarActions>
tags of the WWSettings.xml file.
Mac OS X
- /Library/Application Support/WoodWing
Windows
- c:\ProgramData\WoodWing
Note: This folder is hidden by default. To display this folder, change the folder options. (See the Windows Help file.)
The following syntax is used:
Summarized version:
<EditorToolbarAction label="name" tooltip="tooltip" icon=icon" url="url" silent="true" hideForNewArticle="false"/>
Full version:
<EditorToolbarAction label="name" tooltip="tooltip" icon="{SERVER_URL}/config/images/icon.gif" url="{SERVER_URL}/config/plugins/myplugin.php?sessionid={SESSION_ID}&Id={OBJECT_IDS}&DossierId={DOSSIER_ID}" silent="true" hideForNewArticle="false"/>
- label is the label that appears on the button in the toolbar.
Tip: The button is not very wide so use a short name.
- tooltip is the text that will appear in the tooltip when the mouse pointer is hovered over the button. Use this to explain the purpose of the button.
- icon is the path to the icon for the button. This can be a path to the Server or to an icon hosted online. Use a size of 16x16 pixels and make sure it is in JPG or PNG format. It supports the following wildcards:
- {SERVER_URL} The path to the current instance of Enterprise Server
- {SESSION_ID} The current ticket
Note: The ID of the article is automatically added. (For new articles, an ID of 0 (zero) is used.)
Example:
Results in: http://127.0.0.1/Enterprise/config/plugins/myplugin.php?sessionid=1234&id=1000 |
Tip: Use this when the action that is linked to the button requires specific values that are only available when the article is saved, such as an article ID.
- url is the path to the location that performs the action. This can be a Web site, a script, a Server plug-in in Enterprise, and so on. It supports the following wildcards:
- {SERVER_URL} The path to the current instance of Enterprise Server.
- {SESSION_ID} The current ticket.
Note: The ID of the article is automatically added. (For new articles, an ID of 0 (zero) is used.)
Example:
Results in: http://127.0.0.1/Enterprise/config/plugins/myplugin.php?sessionid=1234&id=1000 |
Tip: Use this when the action that is linked to the button requires specific values that are only available when the article is saved, such as an article ID.
- {DOSSIER_ID} (Requires Content Station 9.8.3 or higher) The ID of the Dossier. It is automatically filled in by Content Station. ID 0 (zero) is used when the object is selected outside of the Dossier.
- {OBJECT_IDS} Comma-separated list of object IDs.
- {SELECTED_TEXT} The selected text, in case of a misspelled word the misspelled word, else the word.
- {NUMBER_OF_TOTAL_CHARACTERS} (Requires Content Station 9.8.8 or higher) The current number of total characters in the article.
- {NUMBER_OF_TOTAL_WORDS} (Requires Content Station 9.8.8 or higher) The current number of total words in the article.
- {NUMBER_OF_TOTAL_PARAGRAPHS} (Requires Content Station 9.8.8 or higher) The current number of total paragraphs in the article.
- {NUMBER_OF_CHARACTERS_IN_COMPONENT} (Requires Content Station 9.8.8 or higher) The current number of characters in the component the focus is in.
- {NUMBER_OF_WORDS_IN_COMPONENT} (Requires Content Station 9.8.8 or higher) The current number of words in the component the focus is in.
- {NUMBER_OF_PARAGRAPHS_IN_COMPONENT} (Requires Content Station 9.8.8 or higher) The current number of paragraphs in the component the focus is in.
- external: (Content Station AIR 9.0 only) When set to true the URL is opened in the system Web browser.
- displayMode (Content Station 9.1 or higher) defines whether the URL is opened in Content Station or in the default Web browser. Possible values:
- internal: (Content Station AIR only, default behavior) In a new tab, including a URL address bar and a Refresh button.
- internalNoNavigation: (Content Station AIR only) In a new tab, without a URL address bar or a Refresh button.
- external: For Content Station AIR: in the system browser; for Content Station Web: in the same browser.
- silent: The URL is not opened; any text that is returned is shown in an alert dialog.
- hideForNewArticle determines whether the button should not appear when the article is not yet saved. Possible values: "true" or "false".
Example: Here, Wikipedia is opened within Content Station:
|
Important: Make sure to validate the WWSettings.xml file for correct content. See Validating the WWSettings.xml file.
Document history
- 23 January 2017: Added:
- {NUMBER_OF_TOTAL_CHARACTERS}
- {NUMBER_OF_TOTAL_WORDS}
- {NUMBER_OF_TOTAL_PARAGRAPHS}
- {NUMBER_OF_CHARACTERS_IN_COMPONENT}
- {NUMBER_OF_WORDS_IN_COMPONENT}
- {NUMBER_OF_PARAGRAPHS_IN_COMPONENT}
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.