Welcome to Delphi Dev HTML Editor
What is Delphi Dev HTML Editor ?
It is a component wrapper for TWebBrowser component, exposing “hidden” functionality of Microsoft IE.
Essentially is a text editor that produces HTML.
With it you can load HTML from a file , from clipboard or write your own as if you were writing inside a memo, edit it, format it and save it.
HTML editor has an data-aware version which can be used in database related applications.
As requested here you can download the demo source code.
I
tried the example shipped with your component but when I click on
“bold” or “center” button nothing happens. I tried to re-compile the
example but still nothing.
Am I doing anything wrong or is there a bug ?
Many thanks
Al
delphidev
Posted August 7, 2012 at 6:09 AM
Hi Al,
there is a possibility that the demo project has a bug.
Due to lack of time, i am unable at the moment to take a look. Sorry
Maybe if you fix it you can post your fix here.
Thanks.
Al
Posted August 12, 2012 at 2:20 PM
I solved this too. The TddHTMLEditor.InternalOnActionExecute was incomplete: the full source is the following:
procedure TddHTMLEditor.InternalOnActionExecute(Sender: TObject);
var
ACmd : TddHTMLEditorCommand;
Idx : Integer;
ClrDlg : TColorDialog;
begin
Idx := FCommandList.IndexOfObject(Sender);
if Idx >= 0 then
begin
ACmd := TddHTMLEditorCommand(Idx);
case ACmd of
hecBulletList : Self.BulletList;
hecCopy : Self.Copy;
hecPaste : Self.Paste;
hecCut : Self.Cut;
hecRedo : Self.Redo;
hecUndo : Self.Undo;
hecForegroundColor,hecBackGroundColor:
begin
ClrDlg := TColorDialog.Create(nil);
try
ClrDlg.Options := [cdFullOpen,cdAnyColor];
if ClrDlg.Execute then
begin
Self.DoExecuteCommand(HTMLEditorCommands[Acmd],False,ClrDlg.Color);
// Self.SetForegroundColor(ClrDlg.Color);
end;
finally
FreeAndNil(ClrDlg);
end;
end;
hecSearch : Self.Search;
hecIdentLeft : Self.IdentLeft;
hecIdentRight : Self.IdentRight;
hecInsertImage : Self.InsertImage;
hecCreateLink : Self.CreateLink;
hecInsertTable : Self.InsertTable;
hecItalic : Self.Italic;
hecBold : Self.Bold;
hecNumberedList : Self.NumberedList;
hecUnderLine : Self.UnderLine;
hecAlignLeft : Self.AlignLeft;
hecAlignCenter : Self.AlignCenter;
hecAlignRight : Self.AlignRight;
end;
end;
end;
I have tried ti connect the data aware version to the Devart PostgreSQL DAC but it doesn’t show the field.
Anybody knows why ?
solved the Devart PostgreSQL DAC issue. As PostgreSQL has no BLOB
field type you have to amend the following line in
TddDBHTMLEditor.DataChange:
FROM if (Assigned(Self.Field)) and (Field.IsBlob) and (not FFromSave) then
TO if (Assigned(Self.Field)) and (not FFromSave) then