zoukankan      html  css  js  c++  java
  • 【ASP.NET Core】mdl conflicts with tinymce

    When I implementd the popular Richtext Editor tinymce for this web application, it conflicts with material design lite's js library, mdl-js-layout, so the editor cannot be edited or the content cannot shows up.

    Here is the solution, add the following js code into your site.js file, and it will fix the conflication bug.

    document.addEventListener('mdl-componentupgraded', function (e) {
        //In case other element are upgraded before the layout  
        if (typeof e.target.MaterialLayout !== 'undefined') {
            // Initialize your tinyMCE Editor with your preferred options
            tinyMCE.init({
                // General options
                mode: "textareas",
                //selector: 'textarea',
                plugins: "advlist autolink link image lists charmap print preview wordcount textcolor insertdatetime anchor emoticons codesample table pagebreak",
                menubar: false,
                toolbar:
                    [
                        "undo redo styleselect bold italic | advlist autolink link image lists charmap print preview wordcount forecolor backcolor insertdatetime anchor emoticons codesample table pagebreak",
                        "",
                    ],
                content_css: "css/site.css",
            });
        }
    });
  • 相关阅读:
    iOS开发时,在Xcode中添加多个Targets进行版本控制
    如何给苹果公司发邮件?
    快快快!27个提升效率的iOS开源库推荐
    史上最全的常用iOS的第三方框架
    Ajax提交与传统表单提交的区别说明
    js原生ajax请求get post笔记
    查看iOS Crash logs
    如何提高iOS开发能力
    iOS 常用的#define合集
    Xcode编译错误和警告汇总
  • 原文地址:https://www.cnblogs.com/brian-ding/p/5337199.html
Copyright © 2011-2022 走看看