1. The actual document is stored in RVF format, which is binary format, and it is stored in BLOB field. I am afraid it is not possible to search for text in BLOB fields (especially considering the fact that it contains not only text but images, font properties, control codes, etc.).
So I think a plain text version is necessary, if you want to search in this text.
I can imagine the following alternatives:
- searching by enumerating each record in a database, loading record content in TRichView one by one, and searching in TRichView. Slow!
- inventing your own plain text format for data saving (for example, like in
Chat codes demo). But if you keep this format simple, you will be able to store only simple formatting properties.
2. When document is edited in TRichViewEdit, you call its method for storing/loading it in a file, stream, database, etc.
TDBRichViewEdit works like other Delphi DB controls: TDBEdit, TDBMemo, etc. It can be linked to a database field by assigning its DataSource and DataField properties, and documents are stored/loaded from DB automatically (with help of TDBNavigator component or its analog).
TDBRichViewEdit can work only together with dataset components (inherited from TDataSet).
SQLite3 may include such component, but, AFAIK, it's designed mainly to support legacy applications, and it is not recommended for using. So I suggest using TRichViewEdit with SQLite3.