Kendo ui 剑道UI编辑器-打开事件

Kendo ui 剑道UI编辑器-打开事件,kendo-ui,Kendo Ui,使用剑道UI编辑器,用户可以单击“插入图像”按钮,图像浏览器将弹出 我希望在用户从编辑器中单击div-external时打开imagebrowser。 我该怎么做?可能吗 我试着搜索了很久,但似乎找不到任何答案。看看这个。在文本框的焦点上,调用下面的jQuery脚本 $('#editor').parent().parent().parent().parent().parent().parent().find('.k-insertImage').click(); 您可以检查此链接:。 只需从浏览

使用剑道UI编辑器,用户可以单击“插入图像”按钮,图像浏览器将弹出

我希望在用户从编辑器中单击div-external时打开imagebrowser。 我该怎么做?可能吗


我试着搜索了很久,但似乎找不到任何答案。

看看这个。在文本框的焦点上,调用下面的jQuery脚本

$('#editor').parent().parent().parent().parent().parent().parent().find('.k-insertImage').click();
您可以检查此链接:。
只需从浏览器控制台调用此脚本。

我忘了回来更新此帖子,但最后,我使用了剑道编辑器并隐藏了所有内容。以下是我所做的,希望有一天这能帮助其他人:

.k-editable-area
{
    display: none;
}

.k-editor
{
    width: 4% !important;
    height: 28px !important;
    border: none !important;
    background-image: none;
    display: none;
    margin-left: 10px;
}

.k-window
{
    display: none;
}
Javascript:

$(document).ready(function () {

   $("#imgBrowser").kendoEditor({
       tools: [
           "insertImage"
       ],
       imageBrowser: {
           messages: {
               dropFilesHere: "Drop files here"
           },
           transport: {
               read: "/ImageBrowser/Read",
               destroy: {
                   url: "/ImageBrowser/Destroy",
                   type: "POST"
               },
               create: {
                   url: "/ImageBrowser/Create",
                   type: "POST"
               },
               thumbnailUrl: "/ImageBrowser/Thumbnail",
               uploadUrl: "/ImageBrowser/Upload",
               imageUrl: "/ImageBrowser/Image?path={0}"
           },
           change: function () {
               //this.value(); //Selected image URL
           },
           select: function () {
           }
       }, execute: function (e) {           
       },
       change: function () {
       },
       select: function () {
           //this.value(); //Selected image URL but each selection is appended... ie:             
           <img /> <img /> <img /> ... you need to replace all except the last one.

           SetSelectedImage(this.value());

       }
   });

谢谢,但最后我想我可以用这个:$(“.k-tool-icon”).trigger('click');
 <a id="imgBrowser"></a><a id="addImage" style="display: inline; cursor: pointer;    
 float: left; font-weight: bold">+ Add image</a>
 $("#addImage").click(function () {
   $(".k-tool-icon").trigger('click');
 });