Rich Text Format Editor
Purpose
The Rich Text Format (Rtf) Editor has been built with the purpose of offering a Word-like editor to the users of Perfion. The Rtf Editor, not to be confused with the Rich Editor, offers a variety of functionalities for the users. The output  to use on different channels such as Web and Print.
How to enable
To enable the Rtf Editor, create a new Text feature in Perfion. In the Feature Definition dialog under the ‘Advanced’-tab, set the Control Type to Rich Text Format Editor.
Â
When the feature has been created you can immediately start using it to edit your content.
It is not advised to change the Control Type of a feature with the Rich Text Format Editor enabled to another Control Type, since it contains Rtf and not only plain text.
Editor Capabilities
The Rtf Editor provides various functionalities for fonts, paragraphs, styles, editing, tables and images. Most of the functionality is known from Microsoft Word.
The editor contains two tabs; Home and Insert
The Home-tab contains the following groups:
Clipboard: Copy/pasting functionality.
Font: Font functionality such as bold, italic, font-color, font-size etc.
Paragraphs: Alignment functionality for paragraphs.
Styles: Drop-down showing all available styles. Refer here for Custom Styles.
Editing: Search and Replace functionality.
The Insert-tab is contains functionality for inserting different useful components; Tables, Pictures, Hyperlinks, Text Boxes and Symbols.
The editor area also contains two tabs; Editor and HTML Viewer.
The Editor-tab is the editor itself. The HTML Viewer-tab is used to see the editor value as HTML. This is read-only and cannot be changed directly.
Custom Styles
It is possible to specify custom styles to be used in the Rtf Editor. These styles can be specified in an XML-document and then loaded into the Perfion client. When installing the Perfion Windows client, an example XML-document can be found in the \Perfion for Dynamics\bin\Custom\Rtf folder called RtfStyles.xml.
To load the XML-document go to ‘Settings’ and click the ellipses in the ‘Rtf Path’ box and point to the XML-document. After loading the Rtf styles document, the custom styles will appear in the ‘Styles’ group in the editor:
Custom styles XML-format
The XML-document must follow a specific format to work:
<styles>
      <style>
             <name>MyStyle1</name>
             <font>Times New Roman</font>
             <font-size>15</font-size>
             <font-color>164, 55, 58</font-color>
             <bold>false</bold>
             <italic>false</italic>
             <underline>false</underline>
      </style>
</styles>
The above example inserts a single custom font, which is specify in the <style>-tags. To specify multiple custom styles, simply add multiple <style>-tags.
A custom style must contain (and is limited to) the following tags:
Name: The name of the style.
Font: The font used in the style.
Font-size: The font-size used in the style.
Font-color: The font-color used in the style. It must be specified as RGB color (Red, Green, Blue).
Bold: Specifies if the style is bold.
Italic: Specifies if the style is italic.
Underline: Specifies if the style is underline.
Storage Format
The editor is based on the DevExpress ‘RichEditControl’ component, which is based on an Rtf-editor. This means that the data saved in the database is Rtf. This enables the editor to embed images, contain tables, apply different kinds of styles to text etc.
It is possible to output the saved rtf content as plain text or Html (see API-section). This is not stored in the database on its own but converted on the fly.
Copy/pasting
Pasting content into the editor will convert the pasted content to rtf and save it in the database. Styles, tables etc. will then be saved.
Caution
When adding content to Perfion via Import or Copy & Paste to the Rich Editor, it is possible to add formatted content that is not supported across multiple channels (e.g. both Web and Print). Please be aware that it cannot be guaranteed that copy/pasting content from e.g. Word to Perfion Rich Text Format Editor will keep all formatting intact and correct.
And for example, via import it is possible to import with references to embedded video and audio content etc. (nothing of which will ever be possible to support for printed output).
API
Feature values for features using the Rtf Editor can be outputted in different kind of ways regarding output kind and styling. The result can be received either as HTML or Rtf. For more information about this, see the Perfion API Reference.
Output to Print
Features with the Rtf Editor can be used in the Report Designer.
Use the ‘Rich Text’ component in the Report Designer and add the feature as the data source.
The full Rtf-value will then be displayed in the report:
Â
Â