dsfsfdsf4544 2018-04-16 23:19
浏览 179
已采纳

找不到主题和插件tinymce laravel 5.4

i am trying to setup tinymce in my web application made in laravel 5.4. I dont know what happened but i made a few modifications and now it can't find "theme.js" and "plugins.js". I had this code at the end of my html file

<script src="{{ URL::asset('js/plugins/tinymce/tinymce.min.js') }}"></script>
<script src="{{ URL::asset('js/components/post/create.js') }}"></script>

This is the code to initialize tinymce:

tinymce.init({
    selector: '#tinymce',
    height: 400,
    plugins: 'advlist autolink link image lists charmap print preview',
    setup: function (editor) {
        editor.getElement().removeAttribute('required');
    }
});

I have all the files needed to run tinymce: Directory structure

  • 写回答

1条回答 默认 最新

  • duanpan7011 2018-04-17 14:31
    关注

    If TinyMCE is not properly calculating its "base URL" for loading other parts of the editor you can explicitly tell it where to look by setting tinymce.baseURL and ``tinymce.baseURI` to the path where the browser can find TinyMCE at runtime. For example:

    tinymce.baseURL = "http://localhost/myapp/tinymce";
    tinymce.baseURI = new tinymce.util.URI(tinymce.baseURL);
    tinymce.init({
        selector: "#editor",
        ....
    });
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料