Microsoft has introduced the Rich Text Editor Control in Recent version which is very useful and powerful text editor which we can use on the form. I have recently implemented and customize it as per the client requirement, please check below details for it.
As client wanted to format the text on the form which is get fulfilled using the Rich Text Edit control and when we use the Rich Text Edit Control it get render with the default formatting Toolbox as shown in below image.
Now the problem is client wanted to customize the Toolbox of the Rich Text Edit control e.g. in our case client don’t wanted change the Font and Font Size to the user and that’s why asked me to remove Font and Font size from the Rich Text Editor Toolbar.
Well, I have tried to find out is there any setting in control properties in a form designer but there is no such kind of settings available for the control.
After checking the documentation provided my Microsoft for the Rich Text Editor Control I found that it can be done using RTEGlobalConfiguration.json web resource, this web resource contains all configuration settings for the Rich Text Box Edit Control.
As per our requirement I have remove the Font and Font Size Option from the toolbox property in this web resource.
"toolbar": [
[ "CopyFormatting" ],
[ "Bold" ],
[ "Italic" ],
[ "Underline" ],
[ "BGColor" ],
[ "TextColor" ],
[ "BulletedList" ],
[ "NumberedList" ],
[ "Outdent" ],
[ "Indent" ],
[ "Blockquote" ],
[ "JustifyLeft" ],
[ "JustifyCenter" ],
[ "JustifyRight" ],
[ "Link" ],
[ "Unlink" ],
[ "Subscript" ],
[ "Superscript" ],
[ "Strike" ],
[ "Image" ],
[ "BidiLtr" ],
[ "BidiRtl" ],
[ "Undo" ],
[ "Redo" ],
[ "RemoveFormat" ],
[ "Table" ]
]
Once it is done save the web resource and publish, that’s it now if you check the Rich Edit Control on form it will render without Font and Font Size tools in toolbar.
For more details please refer-
No comments:
Post a Comment