decreaseFontSizeĪdds a tag around the selection or at the insertion point. Check the compatibility table for usage details. When this behavior is enabled varies between browsers, and its conditions have evolved over time. Removes the current selection and copies it to the clipboard. The URI must contain at least a single character, which may be whitespace. Requires a URI string as a value argument for the hyperlink's href. createLinkĬreates an hyperlink from the selection, but only if there is a selection. Check the compatibility table to determine if you can use it in your case. Conditions of having this behavior enabled vary from one browser to another, and have evolved over time. copyĬopies the current selection to the clipboard. This requires a boolean true/false as the value argument. Makes the content document either read-only or editable. Toggles bold on/off for the selection or at the insertion point. This requires a value string to be passed in as a value argument. In styleWithCss mode, it affects the background color of the containing block instead. The following commands are specified: backColorĬhanges the document background color. SyntaxĪ string specifying the name of the command to execute. In particular, the Clipboard API doesn't replace the insertText command, which you can use to programmatically replace text at the cursor while preserving the undo buffer (edit history) in plain textarea and input elements. The Clipboard API can be used instead of execCommand in many cases, but execCommand is still sometimes useful. When usingĬontentEditable, execCommand() affects the currently active Insert new elements (adding a link), or affect an entire line (indenting). Most commands affect the document's selection (bold, italics, etc.), while others Method to run commands that manipulate the current editable region, such as form inputs or When an HTML document has been switched to Be aware that this feature may cease to work at any time. Avoid using it, and update existing code if possible see the compatibility table at the bottom of this page to guide your decision. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. quer圜ommandSupported() Non-standard Deprecatedĭeprecated: This feature is no longer recommended.quer圜ommandState() Non-standard Deprecated.quer圜ommandEnabled() Non-standard Deprecated.enableStyleSheetsForSet() Non-standard Deprecated.createTouchList() Non-standard Deprecated.selectedStyleSheetSet Non-standard Deprecated.preferredStyleSheetSet Non-standard Deprecated.lastStyleSheetSet Non-standard Deprecated.
0 Comments
Leave a Reply. |