I’m very close to a solution using TRichview, but I have some issues left.
1) The link action is disabled – what do I need to set in order for me to have the link action up and running? It seems like I need to set some event on each TRichViewEdit – doesn’t I ? I have one toolbar but multible TRichViewEdits. It work ok with bold, italic actions but not with InsertLink action.
2) When do I convert the HTML from the database so it will show up in each TRichViewEdit fields? At OnShow or… Does anybody have a generic convert procedure like:
procedure ConvertToRTF(FieldValue: WideString; var RichviewEdit: TRichViewEdit);
begin
try
OpretFBElementForm.RvHtmlImporter1.RichView := RichviewEdit;
OpretFBElementForm.RvHtmlImporter1.LoadHtml(FieldValue);
finally
RichviewEdit.Format;
end;
end;
Do I have to take care of anything, like UTF8 or....
TIA,
Kurt
HTML to TRichViewEdit and enabling the Link action
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
1. Include rvoTagsArePChars in RichViewEdit.Options. It is necessary to allow tags (additional value associated with each item in document) to store strings - hyperlinks targets.
Also, process OnReadHyperlink and OnWriteHyperlink events (just copy their code from the ActionTest demo). They are necessary for RTF.
2. Do you want to use TDBRichViewEdit to display and edit HTML fields? In this case use the events OnLoadCustomFormat and OnSaveCustomFormat.
Also, process OnReadHyperlink and OnWriteHyperlink events (just copy their code from the ActionTest demo). They are necessary for RTF.
2. Do you want to use TDBRichViewEdit to display and edit HTML fields? In this case use the events OnLoadCustomFormat and OnSaveCustomFormat.
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: