【问题标题】:How to Add More Font in Cl-Editor?如何在 Cl-Editor 中添加更多字体?
【发布时间】:2017-06-02 10:57:55
【问题描述】:

我想在我的 Cl-Editor 中添加更多字体。与我的网站相同的字体。我不知道如何添加更多字体。这是我使用 Cl-editor 的代码

<link rel="stylesheet" href="cleditor/jquery.cleditor.css" />
<script src="cleditor/jquery.cleditor.js"></script>
<script src="cleditor/jquery.cleditor.min.js"></script>
<script>
    $(document).ready(function () { $("#desc").cleditor(); });

</script>

  <textarea rows="5" cols="5" name="desc" id="desc" class="form-control"><?php echo $desc?> </textarea>

【问题讨论】:

    标签: javascript css fonts cleditor


    【解决方案1】:
     <script>
        $(document).ready(function() {
            $("#input").cleditor({
                width: 500, // width not including margins, borders or padding
                height: 250, // height not including margins, borders or padding
                controls: // controls to add to the toolbar
                    "bold italic underline strikethrough subscript superscript | font size " +
                    "style | color highlight removeformat | bullets numbering | outdent " +
                    "indent | alignleft center alignright justify | undo redo | " +
                    "rule image link unlink | cut copy paste pastetext | print source",
    
                fonts: // font names in the font popup
                    "Arial,Arial Black,Comic Sans MS,Courier New,Narrow,Garamond," +
                    "Georgia,Impact,Sans Serif,Serif,Tahoma,Trebuchet MS,Verdana",
                sizes: // sizes in the font size popup
                    "1,2,3,4,5,6,7",
    
                useCSS: false, // use CSS to style HTML when possible (not supported in ie)
                docType: // Document type contained within the editor
                    '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
                docCSSFile: // CSS file used to style the document contained within the editor
                    "",
                bodyStyle: // style to assign to document body contained within the editor
                    "margin:4px; font:10pt Arial,Verdana; cursor:text"
            });
        });
    </script>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-08
      • 1970-01-01
      相关资源
      最近更新 更多