zoukankan      html  css  js  c++  java
  • Editor markdown编辑器

    代码示例网址:http://pandao.github.io/editor.md/examples/index.html
    引入文件
    <link rel="stylesheet" href="/editor.md-master/css/editormd.css" />
        <script src="/editor.md-master/editormd.min.js"></script>

    html

     <div id="editormd">
            <textarea style="display:none;" name="Content"></textarea>
        </div>

    js

    var editor;
          editor = editormd("editormd", {
                width   : "99%",
                height  : "600px",
                autoHeightEnabled:true,
                path : '/editor.md-master/lib/',
                //theme : "dark",
                //previewTheme : "dark",
                //editorTheme : "pastel-on-dark",
                markdown : '',
                codeFold : true,
                //syncScrolling : false,
                saveHTMLToTextarea : true,    // 保存 HTML 到 Textarea
                searchReplace : true,
                //watch : false,                // 关闭实时预览
                htmlDecode : "style,script,iframe|on*",            // 开启 HTML 标签解析,为了安全性,默认不开启    
                //toolbar  : false,             //关闭工具栏
                //previewCodeHighlight : false, // 关闭预览 HTML 的代码块高亮,默认开启
                emoji : true,
                taskList : true,
                tocm            : true,         // Using [TOCM]
                tex : true,                   // 开启科学公式TeX语言支持,默认关闭
                flowChart : true,             // 开启流程图支持,默认关闭
                sequenceDiagram : true,       // 开启时序/序列图支持,默认关闭,
                //dialogLockScreen : false,   // 设置弹出层对话框不锁屏,全局通用,默认为true
                //dialogShowMask : false,     // 设置弹出层对话框显示透明遮罩层,全局通用,默认为true
                //dialogDraggable : false,    // 设置弹出层对话框不可拖动,全局通用,默认为true
                //dialogMaskOpacity : 0.4,    // 设置透明遮罩层的透明度,全局通用,默认值为0.1
                //dialogMaskBgColor : "#000", // 设置透明遮罩层的背景颜色,全局通用,默认为#fff
                imageUpload : true,
                imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
                imageUploadURL : "./php/upload.php",
                onload : function() {
                    //console.log('onload', this);
                    //this.fullscreen();
                    //this.unwatch();
                    //this.watch().fullscreen();
    
                    //this.setMarkdown("#PHP");
                    //this.width("100%");
                    //this.height(480);
                    //this.resize("100%", 640);
                }
            });
  • 相关阅读:
    fread 和 read的区别
    Windows下的linux开发环境Cygwin的安装配置
    开机出现grub提示符后怎样进入系统?
    Matlab中函数句柄的优点
    UNIX环境高级编程的apue.h源码APUE
    装了一个ubuntu10.10,打印机不能添加了,
    迅雷上如何下载热映的电影大片~~
    我的linux 初始配置安装的东东,最好保存上一份,对于经常装linux的朋友
    HDU 1875 畅通工程再续
    HDU 1874 畅通工程续
  • 原文地址:https://www.cnblogs.com/xiaonangua/p/9173610.html
Copyright © 2011-2022 走看看