【问题标题】:I have some problems installing ckeditor, anyone who might be able to assist me?我在安装 ckeditor 时遇到了一些问题,谁能帮助我?
【发布时间】:2014-11-24 12:44:43
【问题描述】:

这是我的代码:http://pastebin.com/bL9pacC7

我一直在尝试将 textarea 普通文本框替换为 CKEditor,有人可以帮助我吗?我对此很陌生,所以我会提前对我的菜鸟表示抱歉。

【问题讨论】:

    标签: ckeditor editor textarea


    【解决方案1】:

    如果你想使用“按类替换”的方法,你应该将ckeditor类直接赋值给你想用CKEditor替换的<textarea>元素,所以试试:

    <textarea class="ckeditor" name="pagecontent" id="pagecontent" cols="50" rows="5">
       <?php echo($pagecontent) ?>
    </textarea>
    

    在此处查看示例(尽管没有 PHP):http://ckeditor.com/latest/samples/replacebyclass.html

    【讨论】:

    • 顺便说一句。我不知道$pagecontent 来自哪里,但通常在将内容打印到textarea 之前,它必须使用htmlspecialchars() 进行编码。
    猜你喜欢
    • 1970-01-01
    • 2022-06-21
    • 2022-07-28
    • 2020-01-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-07
    相关资源
    最近更新 更多