DesignerDocument Object Members
SharePoint Designer Developer Reference |
Represents the active HTML document.
Methods
Name | Description | |
---|---|---|
addScript | Adds a script to a specified element for a specified event. | |
applyDynamicTemplate | Applies a Dynamic Web Template to a document. | |
createElement | Creates a new IHTMLElement object that represents an HTML element based on the specified argument. | |
createStyleState | Returns an StyleState object that represents the style properties associated with a specified text range. | |
createUndoTransaction | Creates a new instance of an UndoTransaction object for the specified document. | |
elementFromPoint | Returns the IHTMLElement object that corresponds to the specified page coordinates. | |
execCommand | Executes a specified action on the current document, current selection, or the specified range, and then returns a Boolean that indicates whether the command completed successfully. | |
Find | Executes a search and returns a Boolean that represents whether the search was successful. | |
getScript | Returns a String that represents the script for an event for a specified element. | |
InsertInteractiveButton | Inserts an interactive button into a document at the specified position. | |
isMetaEditable | ||
optimizeHTML | Optimizes the Hypertext Markup Language (HTML) in a Web page. | |
parseCodeChanges | Updates the page when it is displayed in Code view. | |
queryCommandEnabled | Returns a Boolean that indicates if the specified command can be executed. Whether or not a command can be executed is based on the current state of the document. For more information on the state of the current document, see the document's ReadyState property. | |
queryCommandIndeterm | Returns a Boolean that determines if the specified command will return an indeterminate state. | |
queryCommandState | Returns a Boolean that indicates the state of the specified command. If True, the specified command has already been carried out on the current selection. If False, the specified command has not yet been carried out on the current selection. | |
queryCommandText | Returns a String that represents a text value associated with the specified command. | |
queryCommandValue | Returns a String that indicates the value of the specified command. | |
reapplyScript | Verifies that the functions associated with script calls on the selected element are within a SCRIPT element in the HEAD element of the document and inserts them if they are missing. | |
removeScript | Removes the specified script from a given element. | |
save | Saves a document. | |
updateDynamicTemplate | Updates the pages that are attached to a Dynamic Web Template so that any changes to the Dynamic Web Template are applied to pages that reference the Dynamic Web Template. | |
writeFile | Saves the page to the specified path and file name. |
Properties
Name | Description | |
---|---|---|
activeElement | Returns an object that represents the currently selected text or the location of the insertion point in the document. | |
alinkColor | Sets or returns a String that represents the value of the alinkColor attribute, which represents the color of all active links in the document. | |
all | Returns an ElementCollection object that represents a reference to the collection of all elements contained within a specified object. | |
anchors | Returns an ElementCollection object that represents all of the bookmarks in a document. | |
applets | Returns an ElementCollection object that represents the applets attached to a specified document. | |
behaviorElement | Returns an IHTMLElement object that represents the topmost parent element of the active selection, the element that receives the script. Corresponds to the element specified for Scripts on Tag as shown in the Behaviors task pane. | |
bgColor | Returns or sets a String, specifying a color name or red-green-blue (RGB) value, that represents the color behind the content for a specified object. Corresponds to the bgcolor attribute of the BODY element. | |
body | Returns an IHTMLElement object that represents the tags and text between the opening and closing tags of the BODY element a specified document. | |
currentStyleState | Returns a StyleState object that represents the current style state of the specified document. | |
defaultCharset | Returns a String that represents the default character set of the page. | |
documentHTML | Sets or returns a String that represents the HTML tags and content of the specified Document object. | |
domain | Returns a String that represents the name of the server on which the specified document is located or the Web address with which it is associated. | |
dynamicTemplate | Returns a String that represents the path and file name of a Dynamic Web Template. | |
embeds | Returns an ElementCollection interface that represents the EMBED elements contained in a page. | |
fgColor | Sets or returns a String, specifying a color name or red-green-blue (RGB) value, that represents the foreground (or text) color of the document. Corresponds to the text attribute of the BODY element. | |
fileCreatedDate | Retrieves a String that represents the date a Web page was created. | |
fileModifiedDate | Retrieves a String that represents the date a file was last modified. | |
fileSize | Returns a String that represents the file size in bytes. | |
fileUpdatedDate | Retrieves a String that represents the date a file was last updated. | |
forms | Returns an ElementCollection object that represents a collection of all FORM elements contained in a document. | |
frames | Returns an IHTMLFramesCollection2 object that represents the windows in which pages specified in FRAME elements are displayed. | |
hasSharedBorders | Returns a Boolean that represents whether a specified document contains shared borders. | |
htmlViewText | Returns or sets a String that represents the HTML contained in a specified document. | |
ignoreSharedBorders | Returns or sets a Boolean that represents whether to display shared borders in a Web page. True indicates that that shared borders will not be displayed. | |
images | Returns an ElementCollection object that represents all the IMG elements in the specified document. | |
isDirty | Sets or returns a Boolean that represents whether a page has been modified since it was last saved. True indicates that the document has been modified since it was last saved. | |
lastModified | Returns a String that represents the date when the page was last modified, in the form "DD MMM YYYY hh:mm:ss". | |
LayoutTablesAndCells | Returns a LayoutTablesAndCells collection that represents a collection of all the layout cells and cell formatting tables in a document. | |
linkColor | Returns or sets a Variant that represents the color of hyperlinks in the specified document. Corresponds to the link attribute for the BODY element. | |
links | Returns an ElementCollection collection that represents the collection of hyperlinks in a page. | |
mseMode | Returns a Boolean that indicates whether the current document is in MSE mode. MSE mode corresponds to the Microsoft Script Editor. If True, the document is open in Microsoft Script Editor. | |
nameProp | Returns a String that represents the file name of an HTML document without the folder path or file extension. | |
onclick | Sets or returns a Variant that represents the value of the onclick attribute, which is the script that runs when the onclick event fires. | |
ondblclick | Returns or sets a Variant that represents the value of the ondblclick attribute, which is the script that runs when the ondblclick event fires. | |
ondragstart | Returns or sets a Variant that represents the value of the ondragstart attribute, which is the script that runs when the ondragstart event fires. | |
onkeydown | Returns or sets a Variant that represents the value of the onkeydown attribute, which is the script that runs when the onkeydown event fires. | |
onkeyup | Returns or sets a Variant that represents the value of the onkeyup attribute, which is the script that runs when the onkeyup event fires. | |
onmousedown | Returns or sets a Variant that represents the value of the onmousedown attribute, which is the script that runs when the onmousedown event fires. | |
onmousemove | Returns or sets a Variant that represents the value of the onmousemove attribute, which is the script that runs when the onmousemove event fires. | |
onmouseout | Returns or sets a Variant that represents the value of the onmouseout attribute, which is the script that runs when the onmouseout event fires. | |
onmouseover | Returns or sets a Variant that represents the value of the onmouseover attribute, which is the script that runs when the onmouseover event fires. | |
onmouseup | Returns or sets a Variant that represents the value of the onmouseup attribute, which is the script that runs when the onmouseup event fires. | |
onselectstart | Returns or sets a Variant that represents the value of the onselectstart attribute, which is the script that runs when the onselectstart event fires. | |
pageContentElement | Returns an IHTMLElement object that represents the HTML element containing the contents of the specified document. | |
parentWindow | Returns an EditorWindow object that represents the parent window of the current document. | |
plugins | Returns an ElementCollection object that represents the EMBED elements contained in the specified page. | |
protocol | Returns a String that represents how a document is accessed. | |
readyState | Returns a String that represents the state of the specified object. | |
scripts | Returns an ElementCollection collection object that represents the collection of all SCRIPT elements in a Web page. | |
selection | Returns a Selection object that represents the currently selected text in 1st_SPDesignerGeneric. | |
styleSheets | Returns a StyleSheetsCollection collection that represents the collection of all style sheets in a document. | |
templateRegions | Returns an ElementCollection collection that represents the Dynamic Web Template regions in a document. | |
title | Sets or returns a String that represents the value of the TITLE element for a document. | |
url | Returns a String that represents the Uniform Resource Locator (URL) for the document. | |
viewMode | Returns a Long that represents whether the page has been edited in Code view. A 1 indicates that the page has not been edited; a 2 indicates that the page has been edited. | |
vlinkColor | Returns or sets a Variant that specifies the color of all visited links in the current document. Corresponds to the vlink attribute of the BODY element. | |
web | Returns a Web object that represents the Web site in which the specified page exists. | |
webbots | Returns an ElementCollection collection that represents the 1st_SPDesignerGeneric components inserted into the document. | |
webControls | Read-only. | |
webParts | Read-only. | |
webPartZones | Returns an ElementCollection collection that represents the Web Part zones in a document. | |
xslViews | Read-only. |
Events
Name | Description | |
---|---|---|
onclick | Occurs when a user clicks on a page in Design view. | |
ondblclick | Occurs when a user double-clicks on a page. | |
ondragstart | Occurs when the user starts to drag text or elements. | |
onkeydown | Occurs when a users presses a key on the keyboard. | |
onkeyup | Occurs when a user releases a key. | |
onmousedown | Occurs when a user clicks a document with either mouse button. | |
onmousemove | Occurs when the user moves the mouse pointer over a document. | |
onmouseout | Occurs when a user moves the mouse pointer outside the boundaries of a document. | |
onmouseover | Occurs when a user drags the mouse pointer over a document. | |
onmouseup | Occurs when a user releases a mouse button. | |
onselectstart | Occurs when a user starts selecting text or element in a document. |