在tinymce中,如果选择器:' textarea' ..并且在textarea内部存在于body中,row col未应用

时间:2016-12-16 11:25:42

标签: javascript html tinymce



 tinymce.init({
  selector: 'textarea',
  height: 500,
  plugins: [
        "advlist autolink lists link image charmap print preview anchor",
        "searchreplace visualblocks code fullscreen",
        "insertdatetime media table contextmenu paste imagetools","autosave"],
    toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
        
       

});

<textarea>
  
<!--    start your work from here-->
   <div class="row">
    
    <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
        hi
       </div>
       <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
        hi
       </div>
    
    </div>
<!--        end your work-->
</textarea>
&#13;
&#13;
&#13;

结果显示col在新行中..现在,如何在简单的bootstrap中使用我的代码。或者什么是bootstrap插件。

1 个答案:

答案 0 :(得分:1)

要在TinyMCE编辑器中使用bootstrap css,您需要在init函数中指定您的css,如下所示

tinyMCE.init({
  selector: 'textarea',
  content_css : 'bootstrap.css'
});