i’m trying to create dynamically generated icon list for tiny mce. I have written all related php functions i call the function through following code.
$.post(url_file, {
content_name: $class_name,
page_url: filePath,
app_code: app_code
},
function(data){
var buttonlist = data;
});
i need to pass above 3 parameters in order to get these icons . Now i have buttonlist . I tried document.write(buttonlist) but it gives me missing : after property id error.
i am trying to print this within ;
tinyMCE.init({
mode : "exact",
elements : "elm1",
theme : "advanced",
plugins : "Archiv,pagebreak,safari,spellchecker,pagebreak,
style,layer,table,save,advhr,advimage,advlink,
emotions,iespell,inlinepopups,insertdatetime,preview,
media,searchreplace,print,contextmenu,paste,
directionality,fullscreen,noneditable,visualchars,nonbreaking,
xhtmlxtras,template",
--> document.write(buttonlist);
theme_advanced_toolbar_location : "top",
Do you have an idea how i can print this value inside tinymce code?
Help much much appreciated.
you need to add the buttons dynamically right?
try this:
for getting it, use json for each button line:
and then for MCE initialization: