我使用NicEditor(http://nicedit.com)。调整大小窗口NicEditor
首先,我设置的文本域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');
});
刷新niceEdit每个窗口大小调整! –