The add-in manifest
The add-in manifest file is an XML file that can describe multiple panels, commands, dialogs boxes, and event-driven behaviors, and also multiple entry points for the same functionality, such as menu commands and toolbar buttons.
Each add-in requires a manifest file, which is always named "addin.xml." The manifest describes specific aspects of the add-in that are used by Microsoft Expression Web to join the add-in to the program, to create its user interface, and to subscribe to events. Every add-in requires a properly formatted manifest file that must exist in the top level of the folder that contains the add-in and its assets.
Note:
|
|---|
|
All tag and attribute text in a manifest file must be lowercase. Errors in a manifest file can prevent Expression Web from loading the add-in. |
Add-in manifest elements
| Element | Requirement | Description | Details |
|---|---|---|---|
|
addin |
The top-level element for the manifest file. |
required | |
|
name |
The display name of the add-in as it will appear in the Manage Add-ins dialog box. |
required | |
|
author |
The author of the add-in as it will appear in the Manage Add-ins dialog box. |
optional | |
|
description |
The description of the add-in as it will appear in the Manage Add-ins dialog box. |
optional | |
|
guid |
The unique identifier that could be used to differentiate add-ins with the same name For details about the add-in element, see. |
optional | |
|
homepage |
The home page where the user can find information about the add-in. |
optional | |
|
minversion |
The minimum version of Expression Web required to run the add-in. |
optional | |
|
version |
The version of the add-in as it will appear in the Manage Add-ins dialog box. |
optional | |
|
command |
The command that will instantiate the add-in. |
required for commands; omit for panels | |
|
menuitem |
The menu item created to execute the add-in, or to make the panel visible if it is a panel add-in. |
optional, child of command | |
|
toolbaritem |
The toolbar item created to execute the add-in, or to make the panel visible if it is a panel add-in. |
optional, child of command | |
|
panel |
Defines a modeless panel add-in. |
required for panels |
Sample manifest file
<?xml version="1.0" encoding="utf-8" ?> <addin src="addin.js;addin2.js"> <name>JS Test</name> <description>A description</description> <version>1.0</version> <command id="mySimplestAction"> <menuitem parent="MENU_File" before="MENU_File_Save" label="Auto enable/disable"/> </command> <command id="mySimplestAction2"> <toolbaritem parent="COMMANDBAR_File" before="COMMANDBAR_File_Save" imagesrc="addin_img-3.jpg"/> </command> <command id="myComplicatedAction" onclick="function()"> <toolbaritem parent="COMMANDBAR_File" before="COMMANDBAR_File_Save" label="Auto enable/disable"/> <menuitem parent="MENU_File" before="MENU_File_Save" label="Auto enable/disable" imagesrc="addin_img-2.png" tooltip="First Menu item"/> <command id="ShowDialogCommand" onclick="showHTMLDialog('thisDialog.html', null, 'dialogwidth:300; dialogHeight:200')"> <menuitem parent="MENU_File" before="MENU_File_Save" label="Extension File Save" tooltip="Displays a dialog"/> </command> <panel panelid="Listener" title="Listener" src="pluginListener.html" ondocumentchanged="documentChanged()" onelementchanged="elementChanged()"/> <command id="MENU_Panels_Addins"> <menuitem parent="MENU_Panels" label="Addins ..."/> </command> <command id="MENU_Panels_Addins_FirstCommand"> <menuitem parent="MENU_Panels_Addins" label="First menu item"/> </command> </addin>
Note: