The following set of MSHTML editing command identifiers specify an action to take on the given object. They can be used with the IOleCommandTarget::Exec and IOleCommandTarget:QueryStatus methods.
Following this list is information about related MSHTML Editing Glyph Command Identifiers.
IDM_BACKCOLOR | Sets or retrieves the background color of the current selection. |
IDM_BLOCKFMT | Sets or retrieves the current block format tag. |
IDM_BOLD | Toggles the current selection between bold and nonbold. |
IDM_BOOKMARK | Retrieves the name of a bookmark anchor or creates a bookmark anchor for the current selection or insertion point. |
IDM_BUTTON | Overwrites a button control on the current selection. |
IDM_CHECKBOX | Overwrites a check box control on the current selection. |
IDM_CLEARSELECTION | Clears the current selection. |
IDM_COPY | Copies the current selection to the clipboard. |
IDM_CUT | Copies the current selection to the clipboard and then deletes it. |
IDM_DELETE | Deletes the current selection. |
IDM_DROPDOWNBOX | Overwrites a drop-down selection control on the current selection. |
IDM_FIND | Finds and selects text in the current document. |
IDM_FONT | Changes the text color, font, and font size of the current selection based on entries to the font dialog box. |
IDM_FONTNAME | Sets or retrieves the font for the current selection. |
IDM_FONTSIZE | Sets or retrieves the font size for the current selection. |
IDM_FORECOLOR | Sets or retrieves the foreground (text) color of the current selection. |
IDM_GETBLOCKFMTS | Retrieves the strings corresponding to the available block format tags. |
IDM_HORIZONTALLINE | Overwrites a horizontal line on the current selection. |
IDM_HYPERLINK | Retrieves the URL of a hyperlink or creates a hyperlink on the current selection. |
IDM_IFRAME | Overwrites an inline frame on the current selection. |
IDM_IMAGE | Overwrites an image on the current selection. |
IDM_INDENT | Increases the indent of the selected text by one indentation increment. |
IDM_INSFIELDSET | Overwrites a box on the current selection. |
IDM_INSINPUTBUTTON | Overwrites a button control on the current selection. |
IDM_INSINPUTHIDDEN | Inserts a hidden control on the current selection. |
IDM_INSINPUTIMAGE | Overwrites an image control on the current selection. |
IDM_INSINPUTPASSWORD | Overwrites a password control on the current selection. |
IDM_INSINPUTRESET | Overwrites a reset control on the current selection. |
IDM_INSINPUTSUBMIT | Overwrites a submit control on the current selection. |
IDM_INSINPUTUPLOAD | Overwrites a file upload control on the current selection. |
IDM_ITALIC | Toggles the current selection between italic and nonitalic. |
IDM_JUSTIFYCENTER | Centers the format block in which the current selection is located. |
IDM_JUSTIFYLEFT | Left-justifies the format block in which the current selection is located. |
IDM_JUSTIFYRIGHT | Right-justifies the format block in which the current selection is located. |
IDM_LISTBOX | Overwrites a list box selection control on the current selection. |
IDM_MARQUEE | Overwrites an empty marquee on the current selection. |
IDM_ORDERLIST | Toggles the current selection between an ordered list and a normal format block. |
IDM_OUTDENT | Decreases by one increment the indentation of the format block in which the current selection is located. |
IDM_OVERWRITE | Toggles the text-entry mode between insert and overwrite. |
IDM_PARAGRAPH | Overwrites a line break on the current selection. |
IDM_PASTE | Overwrites the contents of the clipboard on the current selection. |
IDM_RADIOBUTTON | Overwrites a radio control on the current selection. |
IDM_REFRESH | Refreshes the current document. |
IDM_REMOVEFORMAT | Removes the formatting tags from the current selection. |
IDM_SELECTALL | Selects the entire document. |
IDM_TEXTAREA | Overwrites a multiline text input control on the current selection. |
IDM_TEXTBOX | Overwrites a text control on the current selection. |
IDM_UNBOOKMARK | Removes any bookmark from the current selection. |
IDM_UNDERLINE | Toggles the current selection between underlined and not underlined. |
IDM_UNLINK | Removes any hyperlink from the current selection. |
IDM_UNORDERLIST | Toggles the current selection between an ordered list and a normal format block. |
MSHTML editing glyph command identifiers, available as of Microsoft® Internet Explorer 5, allow you to to see a graphical representation of certain HTML tags while editing an HTML document. A glyph is a small icon representing these underlying tags.
Glyph rendering of tags is controlled through a table. An example of such a table is provided later in this article. This table is populated and controlled by editing-hosts interested in showing glyphs for certain HTML tags. This table also is populated and controlled through the IDM_* commands that are included in the list below.
The following list describes the MSHTML editing glyph command identifiers.
IDM_SHOWALLTAGS | Displays all the tags that can be shown in Internet Explorer 5. |
IDM_SHOWALIGNEDSITETAGS | Displays a glyph for all the site tags. |
IDM_SHOWSCRIPTTAGS | Displays a glyph for all the <SCRIPT> tags. |
IDM_SHOWSTYLETAGS | Displays a glyph for all the <STYLE> tags. |
IDM_SHOWAREATAGS | Displays a glyph for all the <AREA> tags. |
IDM_SHOWCOMMENTTAGS | Displays a glyph for all the comment tags. |
IDM_SHOWUNKNOWNTAGS | Displays a glyph for all the unknown tags. |
IDM_SHOWWBRTAGS | Displays a glyph for all the word break tags. |
IDM_SHOWMISCTAGS | Displays all the tags shown in Internet Explorer 4.0, including IDM_SHOWALIGNEDSITETAGS, IDM_SHOWSCRIPTTAGS, IDM_SHOWSTYLETAGS, IDM_SHOWCOMMENTTAGS, IDM_SHOWAREATAGS, IDM_SHOWUNKNOWNTAGS, and IDM_SHOWWBRTAGS. |
IDM_ADDTOGLYPHTABLE | Adds specific tags to be viewed as glyphs. |
IDM_EMPTYGLYPHTABLE | Removes all rendering of glyphs, and hides any glyphs. |
IDM_REPLACEGLYPHCONTENTS | Removes rendering of all existing glyphs, and replaces with rendering of glyphs specified by this command. |
The input argument to IDM_ADDGLYPHTOTABLE should be a string representing a glyph table row, which is demonstrated in the following example:
%%p^^%%res://myres.dll/pbgn.gif^^%%0^^%%3^^%%3^^%%4^^%%11^^%%15^^ %%11^^%%15^^**
Each row has a number of fields. Each field begins with %% and ends with ^^. A row is terminated with ** . The following fields are included in a row:
Resources such as res: and URL point to HTML-type resources located in DLL files. These resources can be added to resource files by specifying the name of the gif file such as resname.gif, the format such as HTML, and the path such as "path\\file.gif".
The following is an example of a glyph table row specifying a glyph for an image (IMG) element.
%%img^^%%res://myres.dll/anchor.gif^^%%0^^%%3^^%%1^^%%4^^%%11^^ %%15^^%%11^^%%15^^**
The following is an example of a glyph table row specifying a glyph for IMG elements that are aligned out of the flow to the left and right margins.
%%img^^%%res://myres.dll/left.gif^^%%0^^%%0^^%%3^^%%4^^%%11^^%%15^^ %%11^^%%15^^** %%img^^%%res://myres.dll/right.gif^^%%0^^%%2^^%%3^^%%4^^%%11^^%%15^^ %%11^^%%15^^**
The following is an example of a glyph table row specifying glyphs for both begin and end tags of all paragraph tags.
%%p^^%%res://myres.dll/pbgn.gif^^%%0^^%%3^^%%3^^%%4^^%%11^^%%15^^ %%11^^%%15^^** %%p^^%%res://myres.dll/pend.gif^^%%1^^%%3^^%%3^^%%4^^%%11^^%%15^^ %%11^^%%15^^**
The following is an example of a complete glyph table including a number of glyph rows.
// // String Table - Non-Localizable strings are here // STRINGTABLE DISCARDABLE BEGIN IDS_HTML "HTML" IDS_IEXP3 "HTML - IE 3.0" IDR_HTML "\nPage\nHTML Page\nHTML Files (*.htm;*.html;*.stm;*.stml;*.alx)\n.htm" IDS_RFC1866 "HTML 2.0 (RFC 1866)" IDR_ASP "\nASPage\nActive Server Page\nActive Server Pages (*.asp)\n.asp\n" IDS_GLYPHTABLE1 "%%form^^%%res://!/formbgn.gif^^%%0^^%%3^^ %%3^^%%4^^%%43^^%%14^^%%43^^%%14^^**" IDS_GLYPHTABLE2 "%%form^^%%res://!/formend.gif^^%%1^^%%3^^ %%3^^%%4^^%%43^^%%14^^%%43^^%%14^^**" IDS_GLYPHTABLE3 "%%form^^%%res://!/anchor.gif^^%%0^^%%3^^ %%1^^%%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE4 "%%form^^%%res://!/anchor.gif^^%%0^^%%3^^ %%2^^%%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE5 "%%img^^%%res://!/anchor.gif^^%%2^^%%0^^ %%3^^%%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE6 "%%img^^%%res://!/anchor.gif^^%%2^^%%2^^ %%3^^%%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE7 "%%script^^%%res://!/cltscrpt.gif^^%%2^^ %%3^^%%3^^%%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE8 "%%style^^%%res://!/style.gif^^%%2^^%%3^^ %%3^^%%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE9 "%%comment^^%%res://!/comments.gif^^%%2^^ %%3^^%%3^^%%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE10 "%%25^^%%res://!/comments.gif^^%%2^^%%3^^ %%3^^%%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE11 "%%div^^%%res://!/divbgn.gif^^%%0^^%%3^^ %%3^^%%4^^%%43^^%%14^^%%43^^%%14^^**" IDS_GLYPHTABLE12 "%%div^^%%res://!/divend.gif^^%%1^^%%3^^ %%3^^%%4^^%%43^^%%14^^%%43^^%%14^^**" IDS_GLYPHTABLE13 "%%div^^%%res://!/anchor.gif^^%%0^^%%3^^ %%1^^%%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE14 "%%div^^%%res://!/anchor.gif^^%%0^^%%3^^ %%2^^%%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE15 "%%p^^%%res://!/pbgn.gif^^%%0^^%%3^^%%3^^ %%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE16 "%%p^^%%res://!/pend.gif^^%%1^^%%3^^%%3^^ %%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE17 "%%span^^%%res://!/spanbgn.gif^^%%0^^%%3^^ %%3^^%%4^^%%43^^%%14^^%%43^^%%14^^**" IDS_GLYPHTABLE18 "%%span^^%%res://!/spanend.gif^^%%1^^%%3^^ %%3^^%%4^^%%43^^%%14^^%%43^^%%14^^**" IDS_GLYPHTABLE19 "%%span^^%%res://!/anchor.gif^^%%0^^%%3^^ %%1^^%%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE20 "%%span^^%%res://!/anchor.gif^^%%0^^%%3^^ %%2^^%%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE21 "%%^^%%res://!/unknown.gif^^%%2^^%%3^^ %%3^^%%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE22 "%%br^^%%res://!/br.gif^^%%2^^%%3^^%%3^^ %%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE23 "%%TAGID_NULL^^%%res://!/anchor.gif^^%%2^^ %%3^^%%1^^%%4^^%%20^^%%15^^%%20^^%%15^^**" IDS_GLYPHTABLE24 "%%TAGID_NULL^^%%res://!/anchor.gif^^%%2^^ %%3^^%%2^^%%4^^%%20^^%%15^^%%20^^%%15^^**" END // Glyph resources anchor.gif HTML "anchor.gif" br.gif HTML "br.gif" cltscrpt.gif HTML "cltscrpt.gif" comments.gif HTML "comments.gif" divbgn.gif HTML "divbgn.gif" divend.gif HTML "divend.gif" formbgn.gif HTML "formbgn.gif" formend.gif HTML "formend.gif" pbgn.gif HTML "pbgn.gif" pend.gif HTML "pend.gif" spanbgn.gif HTML "spanbgn.gif" spanend.gif HTML "spanend.gif" style.gif HTML "style.gif" unknown.gif HTML "unknown.gif" /////////////////////////////////////////// // strings for the "StringFileInfo" block #define VER_LEGALCOPYRIGHT_YEARS"1995-1998" #define VER_FILEDESCRIPTION_STR "Microsoft (R) HTML Editing Component" #define VER_INTERNALNAME_STR"TRIEDIT" #define VER_ORIGINALFILENAME_STR"TRIEDIT.DLL"
Note If glyphs for the <BOLD> tag are turned on, glyphs are shown for both the opening and closing tags at the position where they would appear in the flow. However, if glyphs are turned on for nested layouts such as images, tables, input boxes, and so on, only the glyph for the opening tag is shown.