1

我正在自己工作CMS。我使用Dojo Toolkit(版本:1.9)和TinyMCE 4这个项目。显示的TinyMCE编辑器是dijit.Dialogs直接在HTML代码中创建的(不是以编程方式)。我已经阅读了有关JQuery显示工具栏或获取与JQuery UI对话框相关的编辑器内容的问题。不过好在t occur in my project. I use the following code to initialize theTinyMCE`编辑器没有这些问题:

<script type="text/javascript">
    // other dojo.require calls
    dojo.require("dijit.Dialog");
    require(["dijit/form/Button", "dojo/ready", "dojo/json"], function(Button, ready){
        ready(function(){
            loadPageContent();
        });
      });
       // some JQuery initialize for another plugin not related in any way to TinyMCE (displays toast messages)
        $(function() {
            $("#content .grid_5, #content .grid_6").sortable({
                placeholder: 'ui-state-highlight',
                forcePlaceholderSize: true,
                connectWith: '#content .grid_6, #content .grid_5',
                handle: 'h2',
                revert: true
            });
            $("#content .grid_5, #content .grid_6").disableSelection();
        });
        // The TinyMCE initialization:
        tinymce.init({
            selector: "textarea",
            theme: "modern",
            entity_encoding : "raw",
            plugins: [
                "advlist autolink lists link image charmap print preview hr anchor pagebreak",
                "searchreplace wordcount visualblocks visualchars code fullscreen",
                "insertdatetime media nonbreaking save table contextmenu directionality",
                "emoticons template paste textcolor"
            ],
            toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
            toolbar2: "print preview media | forecolor backcolor emoticons",
            image_advtab: true,
        });
    </script>

但是如果我想添加一个链接,链接对话框不允许我插入 URL 和名称。我的问题是:可以在此TinyMCE对话框中选择目标窗口。如果我直接在编辑器中插入 URL,它会被识别为链接,但也无法在链接对话框中进行编辑。

TinyMCE内部编辑器的 HTML 代码dijit.Dialog

<div dojoType="dijit.Dialog" title="Inhaltselement" id="dialogContentRightElement">
    <div style="width: 45em;">
        <form id="dialogContentElement_form">
        <table border="0">
            <tr>
                <td>Farbe/Stil/Spezialkasten:</td>
                <td>
                    <select name="dialogContentRightElement_form_color" id="dialogContentRightElement_form_color">
                        // some options are here
                    </select>
                </td>
            </tr>
            <tr>
                <td>Titel:</td>
                <td><input dojoType="dijit.form.ValidationTextBox" required="true" name="dialogContentRightElement_form_title" id="dialogContentRightElement_form_title"></input></td>
            </tr>
            <tr>
                <td>Inhalt:</td>
            </tr>
        </table>
        <textarea style="width: 42em; height: 20em;" id="dialogContentRightElement_form_content" name="dialogContentRightElement_form_content"></textarea>
        <button dojoType="dijit.form.Button" onClick="saveContentRightNew()">Speichern</button><button dojoType="dijit.form.Button" onClick="dijit.byId('dialogContentRightElement').hide()">Abbrechen</button>
        </form>
    </div>
</div>
4

1 回答 1

1

找到的解决方案:使用dojox.layout.FloatingPane而不是dijit.Dialog. 但我不推荐使用dojox.layout.FloatingPane,我遇到了很多问题,所以我切换回并等到 TinyMCE 更新将解决问题。

于 2013-07-02T07:37:15.457 回答