Drink from, I learned from here to put the knowledge into application, and now dedicate it back to everyone (editable part of the page properties)

Source: Internet
Author: User
The normal way is to activate a <iframe> into edit State, command as follows
Iframenamer.document.designmode= "On"
FONT--XXFarEastFont-Arial, blackbody, italics, etc.
ExecCommand ("FontName", "", font)
Font Size--sizes
ExecCommand ("FontSize", "", Font size)
Increase
ExecCommand ("Bold")
Italic body
ExecCommand ("italic")
Underline
ExecCommand ("Underline")
Delete Line
ExecCommand ("Strikethrough")
Superscript
ExecCommand ("superscript")
Subscript
ExecCommand ("Subscript")
Ordered arrangement--numeric serial number
ExecCommand ("Insertorderedlist")
Unordered arrangement--Dot ordinal
ExecCommand ("Insertunorderedlist")
Indent forward
ExecCommand ("Outdent")
Indent backwards
ExecCommand ("Indent")
Ju Zuo
ExecCommand ("Justifyleft")
Ju Right
ExecCommand ("Justifyright")
Center
ExecCommand ("Justifycenter")
Shear
ExecCommand ("Cut")
Copy
ExecCommand ("Copy")
Paste
ExecCommand ("Paste")
Covered
ExecCommand ("Overwrite")
Cancel Operation--ie5.0 can be canceled indefinitely
ExecCommand ("Undo")
Repeat action
ExecCommand ("Redo")
Set the link--if the following wording, in the IE5.0 version will activate a built-in window, you can complete the function of the input link, but also can choose Mailto, FTP and other types of links, more convenient
ExecCommand ("Createlink")
In IE4.0, there is no built-in link input window, so you need to embed the link in the following ways
ExecCommand ("Createlink", "" ", Turl)
Insert a picture-because the embedded editable controls in IE are for local resources, the default picture resources are local, so web content editors are best to make their own input boxes and then implement them with the following command.
ExecCommand ("Insertimage", "" ", Imgurl)
Font Color
ExecCommand ("ForeColor", "" ", Ccolor)
Background color
I did not find the parameters to control the background color directly in the execcommand command, but it was implemented in the following way
Iframename.document.body.style.backgroundcolor=changecolor
Background image
Iframename.document.body.style.backgroundimage= "URL (' * * * ')"
The above is I do an email content editor used in the attribute, I would like to add more editable items, but the duration is short, not time to do, interested friends can write to discuss.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.