You are here: Reference > CSS > properties > browser specific extensions > -moz-user-modify

-moz-user-modify property | -webkit-user-modify property

Browser support:
-moz-user-modify:
-webkit-user-modify:
Specifies which part of the contents of an element can be modified by the user.
This property is the same as the user-modify property in the CSS3 declaration. The -moz-user-modify property does not seem to work in Firefox. In Google Chrome and Safari, use the -webkit-user-modify property together with the contentEditable attribute.
JavaScript page for this property: MozUserModify | webkitUserModify. You can find other example(s) there.

Possible values:

 One of the following values: 
inherit
Takes the value of this property from the computed style of the parent element.
read-only
Default. User can view/select/copy information in the element, but cannot modify the contents.
read-write
User can view/select/copy and edit the contents of the element.
read-write-plaintext-only
User can select/edit only the plain text content of the element.
write-only
User can select/edit element contents, but cannot view it.
Default: read-only.

Example HTML code 1:

This example illustrates the use of the -moz-user-modify and the -webkit-user-modify properties:
<head>
    <style>
        .readonly {
            -moz-user-modify: read-only;
            -webkit-user-modify: read-only;
        }
        .readwrite {
            -moz-user-modify: read-write;
            -webkit-user-modify: read-write;
        }
    </style>
</head>
<body>
    <div class="readonly" contenteditable="true">The user is not able to change this text.</div>
    <div class="readwrite" contenteditable="true">This text can be modified by the user.</div>
</body>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content