/**
 * CKEDITOR RTE
 */
IGDATAPOOLFE.plugins.add('ckeditor', {
    form: null,
    initFields: function(form) {
	this.init(form);
    },
    init: function(form) {
	let $form = $(form);
	this.form = $form;
	$form.find('.dp-ckeditor textarea').each(function() {
	    if(!$(this).parents('.dp-inlinerecord-container-new').length) {
		var id = $(this).attr('id');
		var config = null;
		if($(this).parents('.dp-ckeditor').data('config')) {
		    config = $(this).parents('.dp-ckeditor').data('config');
		}
		CKEDITOR.replace(id, config);
	    }
	});
    }
});