javascript tinymce - 浏览图像按钮在插入/编辑弹出窗口中不可见

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17830617/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 09:47:08  来源:igfitidea点击:

tinymce - browse image button not visible on the Insert/Edit pop up

phpjavascripttinymce

提问by Archer

i am using the tinymce plugin for having formatted text in the textarea. I am also using the image Insert/Edit Images button(for inline images), but the browse file button does not seem to appear in the dialog boxes that opens after clicking it, so, i am not able to select a file now.

我正在使用 tinymce 插件在 textarea 中格式化文本。我也在使用图像插入/编辑图像按钮(用于内嵌图像),但浏览文件按钮似乎没有出现在单击它后打开的对话框中,因此,我现在无法选择文件。

Below is the init of the plugin and some images of what i was hoping to see

下面是插件的初始化和我希望看到的一些图像

tinymce.init({
            selector: "textarea",
            theme: "modern",
            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 moxiemanager"
            ],
            toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link code image | forecolor backcolor emoticons",
            image_advtab: true,
            statusbar : false,
            menubar : false,
            force_p_newlines : false,
            force_br_newlines : true,
            convert_newlines_to_brs : true,
            forced_root_block : false,
            paste_text_linebreaktype : "br",
            width : 730,
            height : 300,
            templates: [
            {title: 'Test template 1', content: 'Test 1'},
            {title: 'Test template 2', content: 'Test 2'}
            ]
        });

this is what i want ti to be likethis is what i have

这就是我希望你成为的样子这就是我所拥有的

回答by Archer

Well, after trying a few free file managers for tinymce, i came across this.

好吧,在为 tinymce 尝试了一些免费的文件管理器后,我遇到了这个

It is very easy to implement and the readme file give all the config necessary. This works perfectly good.

它很容易实现,自述文件提供了所有必要的配置。这非常有效。

回答by Que Minh

use the code snippet below to fix the problem

使用下面的代码片段来解决问题

file_browser_callback: function (fieldName, url, type, win) {
    // your code         
},