如何在Cl-Editor中添加更多字体?

时间:2017-01-18 06:51:45

标签: javascript css fonts cleditor

我想在我的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>

1 个答案:

答案 0 :(得分: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>
相关问题