jeudi 7 juillet 2016

CKEditor getData() funtion not working

I've a problems with getData(), its not working.

Text Area:



CKEditor:

function createEditor(name)
{
    CKEDITOR.replace(name, {
        //uiColor: '#379e15',
        resize_dir: 'both',
        resize_maxWidth: '800',
        toolbarGroups: [{name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
            {name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align', 'bidi']},
            {name: 'links'}, {name: 'editing', groups: ['find', 'selection', 'spellchecker']}]

    });
}

createEditor(email.ec_id); //Its working

Getting Data:

var data = CKEDITOR.instances[email.ec_id].getData();

Error: Cannot read property 'getData' of undefined

Aucun commentaire:

Enregistrer un commentaire