TinyMCE:开始使用TinyMCE

时间:2017-02-02 17:40:45

标签: javascript jquery tinymce tinymce-4

对不起,如果我问一个愚蠢的问题。我刚刚开始使用TinyMCE。我用Google搜索并找到了他们都说要包含在tinymce.js中的示例。我做到了,但我得到了一个有线屏幕(如下图所示。任何人都可以帮助我,我缺少什么

<!DOCTYPE html>
<html>
<head>
    <script src="jquery-2.2.4.js"></script> 
    <script src="tinymce.js"></script> 
    <script src="theme.js"></script> 
    <!-- Just be careful that you give correct path to your tinymce.min.js file, above is the default example -->
    <script>
        tinymce.init({selector:'textarea'});
    </script>
</head>

<body>
    <textarea>Your content here</textarea>
</body>

</html>

enter image description here

1 个答案:

答案 0 :(得分:0)

这个结构适用于TiniMCE 4.5.1:

目:

<link rel="stylesheet" href="lib/tinymce/skins/lightgray/skin.min.css" />
<link rel="stylesheet" href="lib/tinymce/skins/lightgray/content.min.css" />
<script type="application/javascript" src="lib/jquery/jquery-min.js"></script>
<script type="application/javascript" src="lib/tinymce/tinymce.min.js"></script>

目录:

\lib
    \jquery
           jquery-min.js
    \tinymce
            tinymce.min.js
            \plugins
                    \advlist
                    \anchor
                    \...a lot of plugins
            \skins
                  \lightgray
                            content.min.css
                            skin.min.css
                            \fonts
                                  tinymce.ttf + woff
                                  tinymce-small.ttf + woff
            \themes
                   \modern
                          theme.min.js

希望这有帮助!