468 Part III . Document Objects Reference pasteHTML( HTMLText ) (Photoshop web design)
468 Part III . Document Objects Reference pasteHTML( HTMLText ) Returns: Nothing. Compatibility NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 . IE5 . IE5.5 . While the execCommand() method offers several commands that insert HTML elements into a text range, it is probably more convenient to simply paste fully formed HTML into the current text range (assuming you need to be working with a text range instead of even more simply setting new values to an element object s outerHTML property). Provide the HTML to be inserted as a string parameter to the pasteHTML() method. Use the pasteHTML() method with some forethought. Some HTML that you may attempt to paste into a text range may force the method to wrap additional tags around the content you provide to ensure the validity of the resulting HTML. For example, if you were to replace a text range consisting of a portion of text of a P element with, for instance an LI element, the pasteHTML() method has no choice but to divide the P element into two pieces, because a P element is not a valid container for a solo LI element. This division can greatly disrupt your document object hierarchy, because the divided P element assumes the same ID for both pieces. Existing references to that P element will break, because the reference now returns an array of two like-named objects. On the Example on the CD-ROM CD-ROM Related Items: outerHTMLproperty; insertAdjacenHTML() method. queryCommandEnabled( commandName ) queryCommandIndeterm( commandName ) queryCommandState( commandName ) queryCommandSupported( commandName ) queryCommandText( commandName ) queryCommandValue( commandName ) Returns: See document.queryCommandEnabled() in Chapter 18. NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . . See descriptions under document.queryCommandEnabled() in Chapter 18. TextRange.queryCommandEnabled()
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.