- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 NicEditor ( http://nicedit.com )。
首先,我将文本区域的宽度设置为 100%,但是当我调整窗口大小时,编辑器保持不变,不会调整到新的 100% 窗口宽度。
<textarea style="width: 100%;"> something .. </textarea>
<script>
//<![CDATA[
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
//]]>
</script>
我该如何解决这个问题?
编辑:我找到了一个有效的解决方案:
$(function () {
editor = new nicEditor({fullPanel : false}).panelInstance('text');
})
$(window).resize(function() {
editor.removeInstance('text');
editor = new nicEditor({fullPanel : false}).panelInstance('text');
});
最佳答案
默认情况下,Nice Editor 或 CK Editor 没有响应功能。
试试下面这样的东西。通过父元素控制宽度和高度。
<textarea id="comments" style="width:100%; height:100%;"></textarea>
每次调整窗口大小时,调用 NiceEdit
JS:
var editor;
function reLoadEditor() {
editor.removeInstance('comments');
editor = new nicEditor({fullPanel : false}).panelInstance('comments');
}();
$(window).resize( function() {
reLoadEditor();
} );
引用 - 演示 3:添加/删除 NicEditors:
http://nicedit.com/demos.php?demo=3
关于jquery - 使用 NicEditor 调整窗口大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34578695/
我使用 nicedit.js 作为我的网站内容编辑器。所以我想知道如何更改图片上传位置以及如何创建php文件来做到这一点。 有一个由 http://nicedit.com 给出的文件这是脚本:http
我正在使用 NicEditor ( http://nicedit.com )。 首先,我将文本区域的宽度设置为 100%,但是当我调整窗口大小时,编辑器保持不变,不会调整到新的 100% 窗口宽度。
我正在尝试从 nicEdit 复制内容内容更改时的实例: var myInstance = new nicEditor({ iconsPath : 'https://cdn.jsdelivr.ne
我尝试向我的应用程序添加富文本编辑器。我正在使用nicEdit . bkLib.onDomLoaded(function() { nicEditors.editors.push(new nicEd
我正在使用 nicEdit使用“链接”按钮。我在使用 Chrome 和 Firefox 时遇到不同的问题:我不选择任何文本并引入链接和标题,然后单击提交查询。 在 Chrome 中,会出现一个具有正确
我在我的应用程序中使用了超过 5 个 nicEditors。下面是我的代码 $(document).ready(function() { bkLib.onDomLoaded(function(
您好,我正在使用 NicEditor,我希望字体大小以不同的方式工作。现在编辑器使用: the selected text here 我不希望它成为一个 span 标签,即 the selected
我是一名优秀的程序员,十分优秀!