I would suggest KMemo, (link above). You can stream or use files in RTF for input and output. You will probably need some code to extend the existing end user interactive editing (
https://wiki.freepascal.org/KControls/KMemo_notes ). I use it in my tomboy-ng app, been in use since 2017, quite a few users. Works on Linux, Mac and Windows. Does not care about widget set, just works.
Alternatives are TRichMemo, not quite so cross platform but still good, not as feature rich. Possibly simpler to use.
https://wiki.freepascal.org/RichMemo. Probably consider a GTK2 app only on Linux.
I don't think either of the above are under active development but I have sent in patches to KMemo and had them accepted. I requested extension to the Bullet system (multilevel bullets) and the author did put in quite a considerable effort to get that working.
https://github.com/kryslt/KControls/issuesOn the other hand, TRichMemo has a number of unanswered Issues.
https://github.com/skalogryz/richmemo/issuesTRichView is commercial, closed source (although developer is provided the source under a confidentiality clause) and is only available for Windows with Lazarus.
Davo
e&oe