Tinymce Django textarea没有输入标签

时间:2016-08-24 12:44:04

标签: javascript jquery django tinymce

我需要一些帮助来实现TinyMCE textarea,让它在我的页面上运行。

实施例: This is how it looks

html代码:

<textarea class="replytextarea" id="textarea-edit" placeholder="..." name="text"></textarea>

JS代码:

<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
    <script>tinymce.init({
          selector: '#textarea-edit',
          height: 300,
          theme: 'modern',
          plugins: [
            'advlist autolink lists link image charmap print preview hr anchor pagebreak',
            'searchreplace wordcount visualblocks visualchars code fullscreen',
            'insertdatetime media nonbreaking save table contextmenu directionality',
            'emoticons template paste textcolor colorpicker textpattern imagetools'
          ],
          toolbar1: 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
          toolbar2: 'print preview media | forecolor backcolor emoticons',
          image_advtab: true,
          templates: [
            { title: 'Test template 1', content: 'Test 1' },
            { title: 'Test template 2', content: 'Test 2' }
          ],
          content_css: [
            '//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
            '//www.tinymce.com/css/codepen.min.css'
          ]
         });
  </script>

0 个答案:

没有答案