Add a variable in config.js and populated with values from an ajax call,
add to top of page.
1 2 3 4 5 6 7 8 9 10 11 |
var place = ''; $.ajax({ url: 'getvalues.php', async: false, dataType: 'json', success: function(data) { place = data; } }); |
The ajax call returns the values as JSON. (echo json_encode($my_array))
Then I assigned the variable to the placeholders inside the code of the ckedit config part
1 2 3 4 5 6 |
config.placeholder_select = { placeholders: place, format: '{%placeholder%}' }; |
Hope that helps 🙂
Thanks to Sigal Goplaiah