Friday, December 19, 2014Early this year, our team started the challenging task to create a new component for WYSIWYG editing of formatted text & images for Delphi. From the start, we want to create a control for FireMonkey that would fit neatly the FMX paradigm of one source code to rule all platforms (Windows, iOS, Android, Mac OSX at this time) but realising this would be a huge effort, we wanted that this effort would also be usable for VCL developers targetting Windows only.
After a lot of research was done on performance (as we knew from our experience with other FMX controls this would be difficult) we decided on what we internally disrespectfully call a sandwich architecture. This sandwich architecture should enable us to isolate a core formatted text handling layer from the framework, i.e. the VCL and FireMonkey framework. The benefit clearly is that work on the core only needs to be done once and further evolutions of the core and its maintenance automatically benefits both VCL and FireMonkey framework versions. Visually, this can be seen as:
The core middle layer not only deals with rendering the formatted text and images but also with all the manipulations that can happen with it. Non-trivial areas in this core middle layer abstraction are: dealing with font handling, coordinates and images that are all treated in a different way in VCL and FireMonkey frameworks. Between this architecture and its final implementation is of course lots and lots of hard work both in development and testing. The final result in VCL and FireMonkey platform running on Windows looks like:
TAdvRichEditor : VCL component from TMS Component Pack
TTMSFMXRichEditor : FireMonkey component from TMS Pack for FireMonkey
To whet your appetite to get started with the new editors regardless of what platform or framework you want to use, here is a short feature list:
- Compact light-weight WYSIWYG editor for formatted text
- Supports formatted text with bullets, hyperlinks, images, indenting
- Paragraphs with left,center,right alignment
- Support for images, plain text and formatted text on clipboard
- Undo/redo support
- Find & replace + text highlighting
- Mailmerge function
- Printing (on Windows)
- Exports to .TXT, .RTF, .HTML files.
This blog post has received 8 comments.
Previous | Next | Index