WYSIWYG XML Editor Web应用程序

时间:2016-03-18 11:39:30

标签: javascript xml editor wysiwyg xml-editor

我需要编写一个基于Web的WYSIWYG XML Editor,功能有限。 该应用程序可以以xml格式获取和编辑一些数据。 添加或编辑一些文本并设置一些标记(来自示例)并保存结果。 https://in-frame.com:8088/question.xml 界面可能是这样的:http://fontoxml.com/fontoxml-demo/ 有什么想法或例子吗?

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="style.css" type="text/css"?>
<document>
<header>
    <title>Main Hero</title>
    <description>screenplay</description>
    <header-1>authors:</header-1>
    <authors>
        <autor>Author One</autor>
        <autor>Author Two</autor>
    </authors>
</header>
<body>
    <act id="1">
        <title>Act 1</title>
        <sequence>
            <title>Sequence 1</title>
            <scene id="1" name="Scene One">
                <title>1. Scene One.</title>
                <persons>
                    <person actorId="1" name="Person 1">Person 1,</person>
                    <person actorId="2" name="Person 2">Person 2,</person>
                    <person actorId="3" name="Person 3">Person 3</person>
                </persons>
                <block>
                    <action>
                        Some action <person actorId="1" name="Person 1">Person 1</person>, some other action. <person actorId="2" name="Person 2">Person 2</person> any else.
                    </action>
                </block>
                <block>
                    <person actorId="1" name="Person 1">Person 1
                        <remark>Remark</remark>
                        <dialog>Where are you from?</dialog>
                    </person>
                    <action>Some action <person actorId="1" name="Person 2">Person 2</person> - <person actorId="3" name="Person 3">Person 3</person> some else.</action>
                </block>
                <block>
                    <person actorId="3" name="Person 3">Person 3
                        <dialog>I am from NY!</dialog>
                    </person>
                    <action>Action one.</action>
                    <action pov="yes" pov_person="1">Action two.</action>
                </block>
            </scene>
            <scene id="2" name="Scene 2">
                <title>2. Scene 2.</title>
                <persons>
                    <person actorId="1" name="Person 1">Person 1,</person>
                    <person actorId="2" name="Person 2">Person 2,</person>
                </persons>
                <block>
                    <action pov="yes" pov_person="From cameraof person 1">РОV from Person 1: some action.</action>
                </block>
            </scene>
        </sequence>
    </act>
</body>
</document>

1 个答案:

答案 0 :(得分:1)

这个答案可能会有点晚,但您可以尝试使用Daxe。它允许您为自定义XML编辑器构建Web用户界面,并使用基于模式的实时验证。您可以选择显示具有预定义显示类型的元素(其中一些是WYSIWYG),或者为您的语言创建新元素。它可以集成到一个更大的平台中来处理打开和保存文档。

免责声明:我写了它。