我正在自己的工作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 the
TinyMCE`編輯:dijit.dialog中的TinyMCE編輯器:鏈接對話框不工作
<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>
但是,如果我想添加一個鏈接,鏈接對話框不允許我插入網址和名稱。我的問題是: 可以在此TinyMCE
對話框中選擇目標窗口。如果我直接在編輯器中插入URL,它將被識別爲鏈接,但在鏈接對話框中編輯也是不可能的。
爲dijit.Dialog
內TinyMCE
編輯器中的HTML代碼:發現
<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>
找到與此問題相關的錯誤報告:http://www.tinymce.com/develop/bugtracker_view.php?id=5934 – user1995621