我正在尝试添加http://wysiwygjs.github.io/编辑器到我的CMS。
看来,演示可以通过以下方式启用编辑器:
<script type="text/javascript">
$(document).ready(function() {
// Featured editor
$('#editor1,#editor2,#editor3').each( function(index, element)
{
因此,我已经删除了#editor2和#editor3只是保留我需要的editor1。
然后通过:
在我的脚本中启用它<textarea name="tresc[%id]" id="editor1">
,它仅适用于第一个文本方面,其余的没有工具栏。
如果检查引用的页面,您将看到该工具栏包含在TextArea字段上方的单独的DIV <div class="wysiwyg-toolbar wysiwyg-toolbar-top">...</div>
中。确保您正确安装了Wysiwyg JS文件,并且应该能够实现。