добавив CKEditor на мою страницу html / php - PullRequest
0 голосов
/ 07 мая 2018

У меня есть форум, который я создаю. Теперь я хочу, чтобы CKEditor был моим блоком реакции, чтобы я мог сделать текст полужирным и выделенным , но проблема в том, что я делаю свой веб-сайт в PDO, теперь я скачал плагин но я не совсем уверен, как идти дальше.

Я попробовал этот код:

<div class="box box-info">
    <div class="box-header">
        <h3 class="box-title">CK Editor <small>Advanced and full of features</small></h3>
        <!-- tools box -->
        <div class="pull-right box-tools">
            <button class="btn btn-info btn-sm" data-widget="collapse" data-toggle="tooltip" title="Collapse"><i class="fa fa-minus"></i></button>
            <button class="btn btn-info btn-sm" data-widget="remove" data-toggle="tooltip" title="Remove"><i class="fa fa-times"></i></button>
        </div>
        <!-- /. tools -->
    </div>
    <!-- /.box-header -->
    <div class="box-body pad">
        <form>
            <textarea id="editor1" name="editor1" rows="10" cols="80">
                                            This is my textarea to be replaced with CKEditor.
            </textarea>
        </form>
    </div>
</div>
<!-- /.box -->

<script>
    $(function () {
        // Replace the <textarea id="editor1"> with a CKEditor
        // instance, using default configuration.
        CKEDITOR.replace('editor1');
        //bootstrap WYSIHTML5 - text editor
        $(".textarea").wysihtml5();
    });
</script>

Плагин находится в карте со всеми моими плагинами, которые я использую.

Как это выглядит сейчас

enter image description here

...