There is such a plugin.

/** * Copyright (c) 2014-2018, CKSource - Frederico Knabben. All rights reserved. * Licensed under the terms of the MIT License (see LICENSE.md). * * Basic sample plugin inserting current date and time into the CKEditor editing area. * * Created out of the CKEditor Plugin SDK: * http://docs.ckeditor.com/ckeditor4/docs/#!/guide/plugin_sdk_intro */ // Register the plugin within the editor. CKEDITOR.plugins.add( 'hero', { icons: 'hero', requires : ['richcombo'], //, 'styles' ], init : function( editor ) { editor.addCommand( 'abbrDialog', new CKEDITOR.dialogCommand( 'abbrDialog' ) ); editor.ui.addButton( 'Hero', { label: 'Выбрать героя', command: 'abbrDialog', } ); CKEDITOR.dialog.add( 'abbrDialog', function ( editor ) { var fields; var tenant_fields = []; //new Array(); $.ajax({ url: '/heroes', success: function(data) { for (var key in data) { $('.cke_dialog_ui_input_select select').html('<option value='+data[key][1]+'>'+data[key][0]+'</option>'); } // '<a href="" data-html="true" data-trigger="hover" data-toggle="popover" data-content="rgdrg"><img src="/images/heroes_small/pudge_small.png" style="width: 26px; height: 15px; margin-top: 0; margin-right: 4px" alt="">'+data[key]+'</a>']; } }); // tenant_fields[4]=["Invoker", "4"]; // tenant_fields[5]=["Axe", "5"]; // tenant_fields[6]=["Juggernaut", "6"]; // tenant_fields[7]=["Bloodseeker", "7"]; // tenant_fields[8]=["Zeus", "8"]; // tenant_fields[9]=["Faceless Void", "9"]; // tenant_fields[10]=["Legion Commander", "10"]; // tenant_fields[11]=["Crystal Maiden", "11"]; return { title : 'Выбор героя', minWidth : 400, minHeight : 200, contents : [ { id : 'tab1', label : 'Tenants', elements : [ { id : 'tenant_dropdown', type : 'select', label : 'Выбери героя.', 'default':'', items: tenant_fields } ] } ], onOk : function() { var dialog = this; var abbr = editor.document.createElement( 'span' ); abbr.setText( dialog.getValueOf( 'tab1', 'tenant_dropdown' ) ); editor.insertElement( abbr ); } }; } ); } }); 

It has an ajax request that gets the data I need. Checked in ajax console.log (), accepts all data correctly. So, as I need, here: enter image description here

What is commented out now, how it was before and where it took the necessary values. How do I get values ​​from success now? Namely this:

 data[key][1] data[key][0] 

It is advisable to help code, the whole brain is already boiling (

    0