0

如何用 PHP 设置 CKEditor4 的值?我将变量放在标签内,但它没有加载我从数据库中获取的数据。

<td class="rightpan">
<textarea name="editor1"><?=stripslashes($descriptionH); ?></textarea>
<script>
    CKEDITOR.replace( 'editor1', {
        removePlugins: 'elementspath' 
    });
</script>

有人能帮我吗?它是属于 replace() 函数的东西,例如 Value : $descriptionH 还是什么?

4

1 回答 1

0
<td class="rightpan">
<textarea id="editor1" class="ckeditor" name="editor1"><?php echo htmlspecialchars($descriptionH, ENT_QUOTES); ?></textarea>
<script>
$('#editor1').ckeditor(function() {},
    {
        toolbar: [
            ['Source','Styles', 'Format','TextColor','BGColor'],
            ['Image','Table','HorizontalRule','SpecialChar','PageBreak'],
            ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Scayt'],
            ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', '-', 'About'],
            ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock']
        ],
        width: 650,
        height: 350
    }
);
</script>
于 2013-05-22T12:12:09.083 回答