База данных hkedml сущностей ckeditor

0

Я использую CKEditor с CodeIgniter, и я настроил редактор для отправки символа HTML, но теги не отправляются правильно Изображение 174551

Это контроллер для вставки базы данных:

public function create()
{
    $extra = array(
        'return' => "{$this->_route}index/",
        'success_message' => lang("{$this->_language}:submit_success"),
        'failure_message' => lang("{$this->_language}:submit_failure"),
        'title' => lang("{$this->_language}:create"),
    );
    //$this->streams = 'htmlspecialchars',
    $this->streams->cp->entry_form($this->slug_stream, $this->namespace, 'new', null, true, $extra);
}

это конфигурация ckeditor в файле config.js

/**
 * @license Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.html or http://ckeditor.com/license
 */

CKEDITOR.editorConfig = function( config ) {
    // Define changes to default configuration here.
    // For the complete reference:
    // http://docs.ckeditor.com/#!/api/CKEDITOR.config
    config.entities_latin = false;
    config.forcePasteAsPlainText = false;
    config.fillEmptyBlocks = false;
    config.basicEntities = false;
    config.entities_additional = '#1049';
    config.entities = false;
    config.specialChars = [ '"', '’', [ '&custom;', 'Custom label' ] ];
    config.specialChars = config.specialChars.concat( [ '"', [ '’', 'Custom label' ] ] );
    // The toolbar groups arrangement, optimized for two toolbar rows.
    config.toolbarGroups = [
        { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
        { name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
        { name: 'links' },
        { name: 'insert' },
        { name: 'forms' },
        { name: 'tools' },
        { name: 'document',    groups: [ 'mode', 'document', 'doctools' ] },
        { name: 'others' },
        '/',
        { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
        { name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align' ] },
        { name: 'styles' },
        { name: 'colors' },
        { name: 'about' }
    ];

    // Remove some buttons, provided by the standard plugins, which we don't
    // need to have in the Standard(s) toolbar.
    config.removeButtons = 'Underline,Subscript,Superscript';
};
  • 0
    Можете ли вы обновить свой вопрос с помощью кода, который вставляет данные в базу данных?
  • 0
    посмотри и обнови мой вопрос, данные отправляются через контроллер
Показать ещё 3 комментария
Теги:
codeigniter
ckeditor

1 ответ

0
Лучший ответ

Привет, я нашел решение, в котором он отображается в представлении, чтобы одобрить html_entity_decode,

'description' =>html_entity_decode($item['description'])

Ещё вопросы

Сообщество Overcoder
Наверх
Меню