Share via


MSHTML Editing Reference

This section contains reference information for MSHTML Editing.

Interfaces

Topic Contents
IDisplayPointer

Provides methods that control display pointers so that you can mark sections of an HTML document for editing based on the on-screen rendering of a document.

IDisplayServices

Provides methods that enable the user to work with display pointers and the insertion point as they relate to the on-screen layout.

IElementSegment

This interface provides methods that control a fragment of HTML markup in the current editable selection that consists of a single element.

IHighlightRenderingServices

This interface provides methods that enable you to control which sections of a document are highlighted on the screen and the style of highlighting.

IHighlightSegment

This interface enables you to control a highlighted section of a document.

IHTMLCaret

Provides methods that control the insertion point (caret) in the editor.

IHTMLChangeLog

Provides a method to get information stored in a change log about the changes in a markup container.

IHTMLChangePlayback

Provides a method to play back change records from a change log.

IHTMLChangeSink

Provides notification when a change has occurred in the contents of a markup container.

IHtmlDlgSafeHelper

Provides methods to programmatically access the color dialog box, the block format collection, and the fonts collection.

IHTMLEditDesigner

Provides methods that enable clients using the editor to intercept Windows Internet Explorer events so that they can change the default behavior of the editor.

IHTMLEditHost

Provides a method to customize the way that elements are resized and moved.

IHTMLEditHost2

Extends IHTMLEditHost with a method that enables you to intercept drag-and-drop operations at a stage earlier than the HTMLFrameSiteEvents::ondragstart event.

IHTMLEditServices

Provides methods that enable you to add or remove edit designers, and to control the current selection.

IHTMLEditServices2

Extends IHTMLEditServices.

IHTMLPainter

This custom interface provides methods to MSHTML so that it can draw a rendering behavior.

IHTMLPainterEventInfo

This custom interface provides methods to MSHTML so that a rendering behavior can provide certain special event handling.

IHTMLPainterOverlay

This custom interface provides a method to MSHTML that enables a rendering behavior to use the Microsoft DirectDraw hardware overlay buffer, if the buffer is present.

IHTMLPaintSite

This interface provides methods that enable a rendering behavior to communicate with MSHTML from within the behavior's implementation of the IHTMLPainter::Draw and IHTMLPainter::HitTestPoint methods.

IIMEServices

This interface enables an Active Input Method Editor to access the Active Input Method Manager.

ILineInfo

This interface provides properties that contain information about a line of text in a rendered HTML document.

IMarkupContainer

This interface is an object representing the organization of elements and text in a page.

IMarkupContainer2

This interface provides methods that control a markup container.

IMarkupPointer

This interface, along with the IMarkupServices interface, allows the contents of the page to be programmatically manipulated from your C++ program.

IMarkupPointer2

This interface provides methods that move a markup pointer within a markup container and gather information about the contents of the container.

IMarkupServices

This interface, along with the IMarkupPointer interface, allows the contents of the page to be programmatically manipulated from your C++ program.

IMarkupServices2

This interface provides methods, along with the IMarkupContainer2 and IMarkupPointer2 interfaces, that enable you to edit the contents of an HTML document from your C++ program.

IMarkupTextFrags

This interface provides methods that enable you to insert and remove text from a markup container that is not a part of the actual markup in the container. These text fragments are attached to the content of a markup container, but are not a part of the container itself. They are not represented in the tree for the document. They are, however, saved to the document when the document is saved (for instance, by sending the command IDM_SAVE or IDM_SAVEAS through the IOleCommandTarget interface).

ISegment

This interface provides a method that creates containers (segments) for fragments of HTML markup in the current editable selection. These segments can include both a range of elements and element fragments.

ISegmentList

This interface provides methods that access information about a list of the segments in the current selection.

ISegmentListIterator

This interface provides methods that enable you to traverse a segment list represented by an ISegmentList interface and retrieve its individual members.

ISelectionServices

This interface provides methods to programmatically clear, add content to, and remove content from the selection object.

ISelectionServicesListener

This custom interface provides methods that the editing component of MSHTML calls whenever certain events fire for a selection object that has a registered ISelectionServicesListener interface. This interface provides processing for undo events, for selection type changes, and whenever the mouse pointer exits the scope of an element in the editable selection. An application should supply an implementation of this interface for a selection object so that the editing component of MSHTML can respond to these events.

 

Structures

Topic Contents
HTML_PAINT_DRAW_INFO

Provides information that a rendering behavior might need to draw itself properly or more efficiently.

HTML_PAINT_XFORM

Represents matrices in the HTML_PAINT_DRAW_INFO structure for transforming or translating a rendering behavior's display output when the behavior supports transformations.

HTML_PAINTER_INFO

Passes information from a rendering behavior to MSHTML regarding the behavior's needs, functionality, and how it is to be rendered.

 

Enumerations

Topic Contents
CARET_DIRECTION

Specifies to the IHTMLCaret::MoveCaretToPointer and IHTMLCaret::MoveCaretToPointerEx methods which direction should be the caret's forward direction.

COORD_SYSTEM

Contains values used by the IDisplayServices::TransformPoint and IDisplayPointer::MoveToPoint methods to specify the frame of reference for horizontal and vertical coordinates.

DISPLAY_BREAK

Contains values used by the IDisplayPointer::QueryBreaks method that describe the kind of break located at a display pointer's position.

DISPLAY_GRAVITY

Contains display gravity options for the IDisplayPointer::GetDisplayGravity and IDisplayPointer::SetDisplayGravity methods.

DISPLAY_MOVEUNIT

Contains options for display pointer movement used by the IDisplayPointer::MoveUnit method.

ELEMENT_ADJACENCY

An enumerated type that contains the different options for the IMarkupPointer::MoveAdjacentToElement method.

ELEMENT_CORNER

Indicates to the IHTMLEditHost::SnapRect method which handle or corner of an element a user has selected during an element resize or move operation.

ELEMENT_TAG_ID

An enumerated type that contains the different options for GetNameForTagID, GetTagIDForName, GetElementTagId, and CreateElement methods.

HT_OPTIONS

Contains hit-testing options used by the IDisplayPointer::MoveToPoint method.

HT_RESULTS

Contains hit-result options used by the IDisplayPointer::MoveToPoint method.

HTML_PAINT_DRAW_FLAGS

Used by MSHTML to pass information to the IHTMLPainter::Draw method for a rendering behavior's use.

HTML_PAINT_DRAW_INFO_FLAGS

Specifies which HTML_PAINT_DRAW_INFO structure members to fill during a call to the IHTMLPaintSite::GetDrawInfo method.

HTML_PAINT_EVENT_FLAGS

Specifies which IHTMLPainterEventInfo methods should be called in response to successful hit-tests on the element to which a rendering behavior is attached.

HTML_PAINT_ZORDER

Indicates the order in which a behavior is to be rendered relative to the document content. Used in the lZOrder member of the HTML_PAINTER_INFO structure.

HTML_PAINTER

Specifies a behavior's rendering attributes and requirements. Used in the lFlags member of the HTML_PAINTER_INFO structure, which MSHTML retrieves when it calls IHTMLPainter::GetPainterInfo.

LINE_DIRECTION

Specifies whether a line of text reads from left to right or from right to left in a call to ILineInfo::lineDirection.

MARKUP_CONTEXT_TYPE

An enumerated type that contains the different options for the IMarkupPointer::Right and IMarkupPointer::Left methods.

MOVEUNIT_ACTION

An enumerated type that contains the different options for the IMarkupPointer::MoveUnit method.

POINTER_GRAVITY

An enumerated type that indicates whether a markup pointer will stay with the markup to its right or left when markup is inserted at the pointer's location.

SAVE_SEGMENTS_FLAGS

Contains flags used by the IMarkupServices2::SaveSegmentsToClipboard method.

SECUREURLHOSTVALIDATE_FLAGS

Specifies the URL validation rules for ISecureUrlHost::ValidateSecureUrl.

SELECTION_TYPE

Specifies the current selection type in the ISelectionServices::SetSelectionType and ISegmentList::GetType methods.

 

Constants

Topic Contents
CMDID_SCRIPTSITE_ALLOWRECOVERY

Determines whether the script holder should allow tab recovery.

CMDID_SCRIPTSITE_HTMLDLGTRUST

Indicates whether an HTML dialog is trusted.

CMDID_SCRIPTSITE_IURI

Retrieves the URL of the current document as an IUri.

CMDID_SCRIPTSITE_NAMESPACE

Not implemented.

CMDID_SCRIPTSITE_SECSTATE

Indicates whether the Web site is secure and the length of the encryption key.

CMDID_SCRIPTSITE_SECURITY_WINDOW

Provides access to the window object for the current document.

CMDID_SCRIPTSITE_SID

Retrieves the security ID of the current document.

CMDID_SCRIPTSITE_TRUSTEDDOC

Indicates whether a document is trusted.

CMDID_SCRIPTSITE_URL

Retrieves the full URL of the current document.

IDM_1D_ELEMENT

Determines if an element is statically positioned.

IDM_2D_ELEMENT

Determines if an element is absolutely positioned.

IDM_2D_POSITION

Allows absolutely positioned elements to be moved by dragging.

IDM_ABSOLUTE_POSITION

Sets an element's IHTMLCurrentStyle::position property to "absolute."

IDM_ADDTOGLYPHTABLE

Adds an entry or entries to the glyph table, which specifies images to display for specific tags in design mode.

IDM_ATOMICSELECTION

When this command is issued in design mode, any element that has an ATOMICSELECTION attribute set to TRUE will be selectable only as a unit.

IDM_AUTOURLDETECT_MODE

Turns automatic URL detection on and off.

IDM_CSSEDITING_LEVEL

Allows you to choose which CSS level (CSS1 or CSS2) the editor will support, if any.

IDM_DISABLE_EDITFOCUS_UI

Turns off the hatched border and handles around a site selectable element when the element has "edit focus" in design mode; that is, when the text or contents of the element can be edited.

IDM_EMPTYGLYPHTABLE

Removes all entries from the glyph table, which hides all images displayed for tags in design mode.

IDM_IE50_PASTE

Performs a paste operation compatible with Microsoft Internet Explorer 5.

IDM_IE50_PASTE_MODE

Sets the MSHTML Editor paste operation to be compatible with Internet Explorer 5.

IDM_KEEPSELECTION

Maintains a selection in a browser instance when the browser loses focus.

IDM_LIVERESIZE

Causes the MSHTML Editor to update an element's appearance continuously during a resizing or moving operation, rather than updating only at the completion of the move or resize.

IDM_MULTIPLESELECTION

Allows for the selection of more than one site selectable element at a time when the user holds down the SHIFT or CTRL keys.

IDM_OVERRIDE_CURSOR

Commands the MSHTML Editor never to change the mouse pointer. The mouse pointer will remain fixed as the last icon before the IDM_OVERRIDE_CURSOR command was issued.

IDM_REMOVEFROMGLYPHTABLE

Deletes an entry or entries from the glyph table.

IDM_REPLACEGLYPHCONTENTS

Replaces the current glyph table with a new one, changing which tags have images or which images are displayed for tags in design mode.

IDM_RESPECTVISIBILITY_INDESIGN

When this feature is activated, any element that has a IHTMLCurrentStyle::visibility set to "hidden" or IHTMLCurrentStyle::display property set to "none" will not be shown in both design mode and browse mode.

IDM_SHOWALIGNEDSITETAGS

Displays a glyph for all elements that have a IHTMLCurrentStyle::styleFloat property.

IDM_SHOWALLTAGS

Displays glyphs to show the location of all tags in a document.

IDM_SHOWAREATAGS

Displays a glyph for all the area tags.

IDM_SHOWCOMMENTTAGS

Displays a glyph for all the comment tags.

IDM_SHOWMISCTAGS

Displays all the tags shown in Microsoft Internet Explorer 4.0.

IDM_SHOWSCRIPTTAGS

Displays a glyph for all the script tags.

IDM_SHOWSTYLETAGS

Displays a glyph for all the style tags.

IDM_SHOWUNKNOWNTAGS

Displays a glyph for all the unknown tags.

IDM_SHOWWBRTAGS

Displays a glyph for all the br tags.

IDM_SHOWZEROBORDERATDESIGNTIME

Draws a thin gray border in design mode around block elements that have no borders to show where their boundaries are.