{"id":6602,"date":"2012-08-28T11:36:19","date_gmt":"2012-08-28T06:06:19","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=6602"},"modified":"2016-12-19T14:46:43","modified_gmt":"2016-12-19T09:16:43","slug":"modify-tinymce-imagelink-dialog-content-in-grails","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/modify-tinymce-imagelink-dialog-content-in-grails\/","title":{"rendered":"Modify tinymce image\/link dialog content in grails"},"content":{"rendered":"<p>Recently in a project i used tinymce where i needed to modify the image\/link dialog of tinymce.<br \/>\nTo modify tinymce firstly make it inline\/custom plugin means download and paste in javascript  folder.<br \/>\nTo modify image dialog , create a gsp that you want to show in dialog box and paste in  <\/p>\n<p>[java]<br \/>\n \/web-app\/js\/plugins\/tinymce\/jscripts\/tiny_mce\/plugins\/advimage<br \/>\n[\/java]<br \/>\nI used iframe for fetching additional content along with tinymce image dialog content.<br \/>\n[java]<br \/>\n     &amp;lt;iframe id=&amp;quot;imgUploadEmbedIFrame&amp;quot;<br \/>\n     src=&amp;quot;${createLink(controller:&#8217;controllerName&#8217; ,action:&#8217;actionName&#8217;,params: [id:&#8217;id&#8217;])}&amp;quot;<br \/>\n     style=&amp;quot;border: 0px;  width:425px; height:205px;<br \/>\n     &amp;lt;\/iframe&amp;gt;<br \/>\n[\/java]<\/p>\n<p>and also modify editor_plugin.js so that it will load new html.<\/p>\n<p>[java]<br \/>\n \/web-app\/js\/plugins\/tinymce\/jscripts\/tiny_mce\/plugins\/advimage\/langs\/editor_plugin.js<br \/>\n[\/java]<br \/>\nsearch  file:b+&#8221;\/image.htm&#8221; in editor_plugin.js and change the name of image file . for ex: if name of new file is image.gsp then in editor_plugin.js it should be like this..<br \/>\n[java]<br \/>\n file:b+&amp;quot;\/image.gsp&amp;quot;<br \/>\n[\/java]<br \/>\nSimilarly link dialog can be modified.<\/p>\n<p> for more clarity click here  to view the file structure of tinymce that i have used.<\/p>\n<p>Shaurav<br \/>\nshaurav@intelligrape.com<br \/>\n@shaurav26<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently in a project i used tinymce where i needed to modify the image\/link dialog of tinymce. To modify tinymce firstly make it inline\/custom plugin means download and paste in javascript folder. To modify image dialog , create a gsp that you want to show in dialog box and paste in [java] \/web-app\/js\/plugins\/tinymce\/jscripts\/tiny_mce\/plugins\/advimage [\/java] I [&hellip;]<\/p>\n","protected":false},"author":45,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":1},"categories":[7],"tags":[4840,598],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/6602"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=6602"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/6602\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=6602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=6602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=6602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}