Rich Text Editor: Toolbar Customization

<xp:inputRichText value="#{document1.Body}">
	<xp:this.dojoAttributes>
		<xp:dojoAttribute name="toolbar">
			<xp:this.value>
				<![CDATA[#{javascript:
					var customToolbar = "[['Source', 'Font','FontSize'], \n" +
						"['Bold','Italic','Underline','Strike'], \n" +
						"['TextColor', 'BGColor'], \n" +
						"['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock', '-', 'NumberedList','BulletedList'], \n" +
						"['Outdent','Indent'], \n" +
						"['MenuPaste'], \n" +
						"['Find'], \n" +
						"['Image', 'Table', 'MenuLink', '-', 'Smiley']]";
					return customToolbar;
				}]]>
			</xp:this.value>
		</xp:dojoAttribute>
	</xp:this.dojoAttributes>
</xp:inputRichText>





Simple snippet illustrating toolbar customization of the Rich Text Editor (c/w 'Source' toolbar option).

XPages
Tony McGuckin
April 27, 2012 2:59 AM
Rating
61

All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.



No comments yetLogin first to comment...