I wanted to add more extensions to the dojo editor in my spring roo application , below is what I did
I added the required plugins to be added to Editor like below
and I added the decoraiton like below
IN editor.tagx
I added the required plugins to be added to Editor like below
<script type="text/javascript">
dojo.require("dijit.Editor");
<!-- Added by sajjad as recomeneded in http://forum.spring.io/forum/spring-projects/web/web-flow/85188-customize-dojo-dijit-editor -->
dojo.require('dijit._editor.plugins.ViewSource');
dojo.require('dijit._editor.plugins.FullScreen');
dojo.require('dijit._editor.plugins.FullScreen');
</script>
and I added the decoraiton like below
//**Added by sajjad as recomended in http://forum.spring.io/forum/spring-projects/web/web-flow/85188-customize-dojo-dijit-editor
Spring.addDecoration(
new Spring.ElementDecoration({elementId : '_${sec_field}_id_', widgetType : 'dijit.Editor', widgetAttrs : {disabled: ${disabled},extraPlugins: ['viewsource','fullscreen']}}));
In order to change the default height of the editor which was taking alot of space in my page I had to include height widgetAttrs to the below line
ReplyDeleteSpring.addDecoration(new Spring.ElementDecoration({elementId : '_${sec_field}_id_', widgetType : 'dijit.Editor', widgetAttrs : {disabled: ${disabled}, height : '60px',extraPlugins: ['viewsource','fullscreen']}}));
It was that easy to do , but took me 2 hours to figure out which is the best place to do that :).