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",
            });
        }
    });
  • 相关阅读:
    P1215 [USACO1.4]母亲的牛奶 Mother's Milk
    P2966 [USACO09DEC]牛收费路径Cow Toll Paths
    P2419 [USACO08JAN]牛大赛Cow Contest
    1085 数字游戏
    P1983 车站分级
    P1346 电车(dijkstra)
    P1196 银河英雄传说(加权并查集)
    P1195 口袋的天空
    3027 线段覆盖 2
    codevs 1214 线段覆盖/1643 线段覆盖 3
  • 原文地址:https://www.cnblogs.com/brian-ding/p/5337199.html
Copyright © 2011-2022 走看看