contentEditable on nodes in a XML/compound document?

后端 未结 3 1926
难免孤独
难免孤独 2021-01-28 23:45

I have an XML document that I\'m displaying in a web browser, with a stylesheet attached:


<         


        
3条回答
  •  自闭症患者
    2021-01-29 00:25

    Firefox is one of the few browsers that strictly enforces the XHTML spec. So, to make an element editable, you must specify the contenteditable attribute as true. Note that the whole attribute name is lower case. In your example the first "E" in editable was capitalized.

    Another quirk that should be mentioned is that IE(6,7,8) act exactly the opposite. To make an element editable in IE, you MUST add contentEditable="true" exactly. For what ever reason, contenteditable="true" (as well as any other variation in capitalization) does not work.

提交回复
热议问题