Announcement Announcement Module
Collapse
No announcement yet.
Dojo toolkit Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dojo toolkit

    I'm trying to customize the dijit.Editor default implementation used by Spring JavaScript to support 'Insert Link', 'Insert Image' etc.

    I changed following editor.tagx:

    Code:
    	<script type="text/javascript">
    			dojo.require("dijit.Editor");
                            dojo.require("dijit._editor.plugins.FontChoice");
    			dojo.require("dijit._editor.plugins.TextColor");
    			dojo.require("dijit._editor.plugins.LinkDialog");
     
    		</script>
    		<div id="_${id}_id">
    		    <label for="_${field}_id"><c:out value="${label}"/>:</label>
    		    <form:textarea id="_${field}_id" path="${field}" disabled="${disabled}"/>
    		    <br/>
    		    <form:errors cssClass="errors" id="_${field}_error_id" path="${field}"/>
    		    <spring:message arguments="${label}" code="field_invalid" var="field_invalid"/>
    		    <c:choose>
    				<c:when test="${required}">
    					<spring:message code="field_required" var="field_required"/>
    					<spring:message argumentSeparator="," arguments="${label},(${field_required})" code="field_simple_validation" var="field_validation"/>
    				</c:when>
    				<c:otherwise>
    					<spring:message argumentSeparator="," arguments="${label}, " code="field_simple_validation" var="field_validation"/>
    				</c:otherwise>
    			</c:choose>
    			<script type="text/javascript">
                                   Spring.addDecoration(new Spring.ElementDecoration(
                                                 {elementId : '_${field}_id', 
                                                   widgetType : 'dijit.Editor', 
                                                   widgetAttrs : {disabled: '${disabled}', 
                                                                       plugin:"['createLink']",  
                                                                       extraPlugins: "['foreColor', 'hiliteColor', 
                                                                                           {name:'dijit._editor.plugins.FontChoice', command:'fontName', generic:true}]"
    }}));</script>
    Still no new toolbar button is visible on UI.

    Thanks in advance.
    Last edited by rajatluthra; Jul 26th, 2010, 04:55 PM.
Working...
X