1

私は自分で働いていCMSます。私はDojo Toolkit(バージョン: 1.9)TinyMCE 4をこのプロジェクトに使用しています。コード内で (プログラムではなく) 直接作成されるエディターが示されていますTinyMCE。ツールバーを表示したり、ダイアログに関連してエディターのコンテンツを取得したりする際の問題について読んだことがあります。しかし、幸いなことに、これらの問題はTinyMCE` エディタには当てはまりません:dijit.DialogsHTMLJQueryJQuery UIt occur in my project. I use the following code to initialize the

<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 に答える