问题描述
我有我显示在Web浏览器的XML文档,用样式表附:
I have an XML document that I'm displaying in a web browser, with a stylesheet attached:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet type="text/css" href="abc.css"?>
<myxml xmlns:xhtml="http://www.w3.org/1999/xhtml">
<para>I wish i was editable</para>
<xhtml:script type="text/javascript" src="abc.js"/>
</myxml>
使用XHTML命名空间声明,XHTML:script标签,我可以执行JavaScript的
With the xhtml namespace declaration, and xhtml:script tag, I can execute javascript.
我想要做的就是让这个文档内容的任意非XHTML元素编辑。 (其实,他们会在另一个命名空间)
What I'd like to do is to make arbitrary non-XHTML elements in this document content editable. (Actually, they'll be in another namespace)
即使我明确地添加@ CONTENTEDITABLE =真(即不诉诸JavaScript)的,内容是不是(在Firefox 3.0.4)实际上可编辑的。
Even if I explicitly add @contentEditable="true" (ie without resorting to Javascript), the content is not actually editable (in Firefox 3.0.4).
是否有可能在任何当前浏览器来编辑它? (我与&LT没有问题;在/ DIV
>; DIV CONTENTEDITABLE =真正的>编辑我&LT XHTML 1.0过渡DOC)
Is it possible to edit it in any of the current browsers? (I had no problems with <div contentEditable="true"
>Edit me</div
> in an XHTML 1.0 Transitional doc)
我甚至不能编辑XHTML如果我能做到这一点,这可能提供了前进的道路。
I can't even edit an xhtml:div in this document (in Firefox); if I could do that, that may offer a way forward.
推荐答案
在Firefox 3中,@内容编辑=真不仅使关元可编辑,如果
内容类型是text / html的(如果本地文件名以.html结束这也恰好)
In Firefox 3, @content-editable="true" only makes the relevant element editable if thecontent type is text/html (which also happens if a local filename ends with .html)
它不适合的内容类型工作的应用程序/ xhtml + xml或text / xml的(本地文件名以.xhtml或.xml结尾)
It doesn't work for content types app/xhtml+xml or text/xml (local filenames ending with .xhtml or .xml)
我登录这个增强:
这篇关于CONTENTEDITABLE在XML /复合文档中的节点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!