isContentEditable property
[This documentation is preliminary and is subject to change.]
Gets the value that indicates whether the user can edit the contents of the object.
Syntax
HRESULT value = object.get_isContentEditable(VARIANT_BOOL* p);
Property values
Type: VARIANT_BOOL
VARIANT_FALSE (false)
The content cannot be edited.
VARIANT_TRUE (true)
The content can be edited.
Examples
The following example shows how to use the IHTMLElement3::isContentEditable property to determine whether the user can edit the content of an object.
Code example: https://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/editRegions.htm
<head>
<SCRIPT>
function chgSpan() {
currentState = oSpan.isContentEditable;
newState = !currentState;
oSpan.contentEditable = newState;
oCurrentValue.innerText = newState;
newState==false ? oBtn.innerText="Enable Editing" :
oBtn.innerText="Disable Editing"
}
</SCRIPT>
</head>
<body onload="oCurrentValue.innerText = oSpan.isContentEditable;">
<P>Click the button to enable or disable SPAN content editing.</P>
<P>
<BUTTON ID="oBtn" onclick="chgSpan()">Enable Editing</BUTTON>
</P>
<P><SPAN ID="oSpan">You can edit this text.</SPAN></P>
Span can be edited: <SPAN ID="oCurrentValue"></SPAN>
</body>
Build date: 6/12/2012