Rich Text Field Customizations – Toolset BDF

During a recent customer engagement, I was asked to help customize the Rich Text Field (RTF) available in the Toolset.  The following customizations are available whether you are using the RTF in a Business Data Form Adapter (BDF) or in a list or library.

The customer wanted to customize the tool options and configure a default font type and font size for RTF being configured in several of their BDF forms.

Below is a screenshot of how they wanted the RTF control customized.

RTF UI

You will notice that there are less tool options than what the out of the box RTF control comes configured with.  The customer wanted to also set the font type and font size while removing the ability to change it within the UI.  In this example, it’s been configured to use Times New Romans and 24pt font.

Here are the steps for configuring the RTF to look as it does in the above image.

1) Create an XML file for the tool options being configured.

<?xml version="1.0" encoding="utf-8" ?>
<root>
    <tools>
        <tool name="AjaxSpellCheck"/>
        <tool separator="true"/>
        <tool name="Bold"/>
        <tool name="Italic"/>
        <tool name="Underline"/>
        <tool separator="true"/>
        <tool name="JustifyLeft"/>
        <tool name="JustifyCenter"/>
        <tool name="JustifyRight"/>
        <tool separator="true"/>
        <tool name="InsertOrderedList"/>
        <tool name="InsertUnorderedList"/>
        <tool separator="true"/>
        <tool name="Outdent"/>
        <tool name="Indent"/>
        <tool separator="true"/>
    </tools>
</root>

If you look at the image above, you will notice the correlation between the options being configured in the XML file and what appears in the UI.

2) This file must be placed on the server in the following path. And needs to be placed on each SharePoint WFE.

ToolsFile Path

3) Create a CSS file for the font type and font size desired.

body
{
    font-family: Times New Roman;
    font-size: 8pt;
}
4) Upload the CSS file into a document library.

5) Configure your RTF controls in your BDF form file to use these files.

RTF Config

The image above shows how you need to configure the RTF control in your BDF form file. Note the <ToolFileLocation> node and the <ContentAreaCssFile> node.

The CSS file can not be located in a virtual directory but needs to be in an actual document library and then referenced in the RTF control configuration as noted above.

Each RTF control can have different configuration options by implementing different Tool files and CSS files.  You can implement just a Tools file and not use the CSS file at all.  The options are up to your implementation requirements.

Posted by Rodney Fickas on 12-Jun-09

1 comment to Rich Text Field Customizations – Toolset BDF

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>