tinymce.PluginManager.add("page_generator_pro_spintax_generate",function(e){e.addButton("page_generator_pro_spintax_generate",{title:"Generate Spintax from selected Text",image:page_generator_pro_tinymce.icons.page_generator_pro_spintax_generate,cmd:"page_generator_pro_spintax_generate"}),e.addCommand("page_generator_pro_spintax_generate",function(){wpzinc_modal_open("Generating...");const e=tinyMCE.activeEditor.selection.getContent();jQuery.post(ajaxurl,{action:"page_generator_pro_tinymce_spintax_generate",nonce:page_generator_pro_tinymce.nonces.page_generator_pro_spintax_generate,content:e},function(e){return e.success?(tinyMCE.activeEditor.selection.setContent(e.data),wpzinc_modal_show_success_and_exit("Done!")):wpzinc_modal_show_error_message(e.data)})})});