javascript - 无法在 Bootstrap 容器中添加所见即所得编辑器

标签 javascript html css twitter-bootstrap wysiwyg

我正在尝试为我自己的博客 cms 开发一个管理页面,例如 wp。

但是我无法在我的管理页面中添加所见即所得的编辑器

<div class="box-inner">

         <style type="text/javascript"> $('#editor').wysiwyg();</style> /* this is editor */


        <div class="box-header well" data-original-title="">
            <h2><i class="glyphicon glyphicon-edit"></i>  Add Article</h2>

            <div class="box-icon">

                <a href="#" class="btn btn-minimize btn-round btn-default"><i
                        class="glyphicon glyphicon-chevron-up"></i></a>
                <a href="#" class="btn btn-close btn-round btn-default"><i
                        class="glyphicon glyphicon-remove"></i></a>
            </div>
        </div>

enter image description here

最佳答案

不确定编辑器如何工作,但您的脚本标签已损坏:

<style type="text/javascript"> $('#editor').wysiwyg();</style> /* this is editor */

应该是:

<script type="text/javascript"> 
   $('#editor').wysiwyg(); /* this is editor */
</script>

关于javascript - 无法在 Bootstrap 容器中添加所见即所得编辑器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31157383/

相关文章:

javascript - 来自 ICEcast 的信息

javascript - 制作类似谷歌日历的拖动界面

javascript - 调用ajax时结果没有出现在屏幕上

html - 如何以固定位置和 100% 高度将 2 个 div 并排放置

javascript - 如何在网站中导入来自各个电子邮件服务提供商的电子邮件联系人?

javascript - 有没有办法用 JavaScript/CSS 制作 3D 文本效果

javascript - 使用 jQuery 在悬停时更改文本

html - 在父元素中间居中文本

html - 允许背景图片展开

CSS 更改未在网站上更新