CKEditor4 - Empty $_POST variable

CKEditor4 - Empty $_POST variable

szakendreszakendre Posts: 24Questions: 10Answers: 0

Hello,

I tried to integrate CKEditor4 with my DT Editor.
I foolowed the guide here: https://editor.datatables.net/plug-ins/field-type/editor.ckeditor4
The CKEditor4 appears appropriately.

The problem is that the $_POST variable is empty when I save the editor fields.
If I use textarea field type, everything works well.

HTML headers:

    <script type="text/javascript" src="<?php print $_SESSION['basedir']; ?>/ckeditor4/ckeditor.js"></script>
    <script type="text/javascript" src="<?php print $_SESSION['basedir']; ?>/editor.ckeditor4.js"></script>

JS:

        var editor1 = new $.fn.dataTable.Editor(
        {
            ajax:
            {
                url: 'ajax/knowhow.php',
                type: "POST",
                data: function ( d )
                {
                    d.user = GLOBAL_user;
                }
            },
            table: '#SZAK_editor_1',
            fields: [
                {
                    "label": "Megoldas:",
                    "name": "megoldas",
                    "type": "ckeditor",
                    opts:
                    {
                        toolbar: 'toolbarGroups'
                    },
                    "className": "full block"
                },

Server side (ajax/knowhow.php):

    $editor = Editor::inst( $db, 'knowhow', 'id' )
    ->fields(
        Field::inst( 'id' )->set( false ),
        Field::inst( 'megoldas' )
    )

Does anybody know the solution?

Thank you and best regards:
Endre, Szak

Answers

  • allanallan Posts: 63,572Questions: 1Answers: 10,482 Site admin

    Hi Szak,

    That looks like it should be all you need to do. Could you give me a link to your page so I can take a look and debug it please?

    Regards,
    Allan

This discussion has been closed.