• TinyMCE


    官网 :

    http://archive.tinymce.com/wiki.php/Configuration

    <script type="text/javascript" src="/js/tinymce/tinymce.min.js"></script>
    <script type="text/javascript">
    tinymce.init({
        selector: "textarea",
        language : 'zh_CN',
        theme: "modern",
        height: 300,
        plugins: [
             "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
             "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
             "save table contextmenu directionality emoticons template paste textcolor"
       ],
       content_css: "css/content.css",
       toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l      ink image | print preview media fullpage | forecolor backcolor fontselect fontsizeselect emoticons",
       
     });
    </script>
     
    <form id="form" method="post">
        <input id="title">
        <textarea id="content"></textarea>
    </form>

    2.换成中文

    http://www.tinymce.com/i18n/ 下载中文zh_CN.js。copy到工程,修改init参数
     

    3.添加字体

    修改tinymce.min.js,查找fontselect关键字,把自己想要的字体加进去

     

    4.修改默认字体

    修改content.min.css,在body的font-family添加SimSun,Microsoft YaHei

     

    5.修改行距,即是修改<p>样式

    修改content.min.css,在这个文件最前面加入p{margin:5px;padding:0;}

  • 相关阅读:
    如何保存一张网页上的图片(C#)到本地计算机上
    SQL Server2005常用基本管理操作
    C#保存图片到数据库,读取图片显示
    简析正则表达式
    HDU 变形课
    HDU 1272 小希的迷宫
    HDU 1856 More is better
    POJ 1269 Intersecting Lines
    HDU Football Score
    HDU 1213 How Many Tables
  • 原文地址:https://www.cnblogs.com/jeffry/p/5291841.html
Copyright © 2020-2023  润新知