Blog Options
Archive
<< March 2026 >>-
Monday 16
- Better Delphi Code from AI Agents with TMS Skills -
Friday 13
- TMS Training Days 2026 - Community Evening -
Wednesday 11
- The Next Evolution of Charting in Delphi: Data Import & Export -
Monday 9
- Meet Gjalt Vanhouwaert at TMS Training Days 2026 -
Friday 6
- Meet Pieter Scheldeman at TMS Training Days 2026 -
Thursday 5
- Enabling TLS 1.3 in TMS MQTT and TMS FNC Products -
Wednesday 4
- Meet Antonio Zapater at TMS Training Days 2026 -
Tuesday 3
- The Next Evolution of Charting in Delphi: Getting Started -
Monday 2
- Meet José Leon Serna at TMS Training Days 2026
- Meet Dennis Roehner at TMS Training Days 2026
- Meet Bradley Velghe at TMS Training Days 2026
- Unlock PDF Interactivity in Delphi with TTMSFNCPDFLib Form Fields
Authors
- Bernard Roussely (3)
- Wagner Landgraf (98)
- Dennis Röhner (1)
- Roman Yankovsky (2)
- Bart Holvoet (42)
- Aaron Decramer (81)
- Pieter Scheldeman (133)
- Nancy Lescouhier (32)
- Adrian Gallero (34)
- Bruno Fierens (450)
- Marcos Douglas B. Santos (5)
- Bernard (4)
- Bradley Velghe (36)
- Andrew Simard (86)
- Holger Flick (15)
- Gjalt Vanhouwaert (44)
- Tunde Keller (37)
- Masiha Zemarai (117)
Blog
All Blog Posts | Next Post | Previous Post
TMS WEB Core: Integrating the Froala Editor
Thursday, July 4, 2019
How to integrate a JavaScript component into TMS WEB Core
As a proof of concept, this article describes how easy it is to achieve a basic integration of the Froala Editor into TMS WEB Core.Froala Editor is a lightweight WYSIWYG HTML Editor written in Javascript that enables rich text editing capabilities for your applications.
Getting started
Add a link to the Froala CSS and the JavaScript library.- Download Froala Editor
- Add the required CSS and JS files to the project folder
- Embed a link in the project's HTML file
<link href="css/froala_editor.pkgd.min.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="js/froala_editor.pkgd.min.js"></script>
Setup the Froala Editor
Now that the JS file is added, we have access to the Froala Editor library- Declare an external function so we can use Object Pascal to create the Editor Object
- Create an object that links the Froala Editor events with the WEB Core event handlers
- Initialize the Froala Editor
var
FEvents: TJSObject;
FFroalaEditor: TJSObject;
function froalaEditor(s: string; jsObject: TJSObject): TJSObject; overload; external name 'new FroalaEditor';
begin
FEvents := new([
'contentChanged', @HandleChanged,
'initialized', @HandleLoaded,
'focus', @HandleStartEdit,
'blur', @HandleEndEdit
]);
FFroalaEditor := froalaEditor('div#' + ElementID, new([
'toolbarInline', false,
'events', FEvents
]));
end;
Two modes
There are two ways to use the Froala Editor:Classic
Display the Froala WYSIWYG HTML Editor in your TMS WEB Core project.
This is the default behaviour.
Inline
Connect any TWebLabel to the TWebFroalaEditor component to instantly make it editable in the browser.
WebLabel1.EventStopPropagation := []; WebFroalaEditor1.Visible := False; WebFroalaEditor1.InlineEditing := True; WebFroalaEditor1.Editor := WebLabel1;
Live demo and source code
View the live demo
Download the full source code
Note: TMS WEB Core v1.2.3.0 or newer is required.
Install Notes:
The ZIP file contains two folders:
- The "Component Library Source" folder: Build and install the package file "TMSWEBFroalaEditor"
- The "Core Source" folder:
- Option 1: Copy the PAS file to the "Core Source" subfolder of the TMS WEB Core install folder
- Option 2: Add the path of the folder to the TMS WEB library path. (in the Delphi IDE: Tools>Options>TMS WEB>Library Path)
Bart Holvoet
This blog post has not received any comments yet.
All Blog Posts | Next Post | Previous Post
