Should I build a custom text editor from scratch or enhance existing ones?

I'm developing a Windows WPF app that needs to edit a certain type of document and I need a highly customized editor to do so: The text is a transcription of an audio feed, and I need to sync the the text with a time code of the corresponding word in the audio stream (red numbers on left). This may involve breaking text not at a carriage return (not actually present in my text), but based on a custom timing algorithm (as shown). I also want custom cursor logic, for instance, having CTRL + -> jumping ahead 10 seconds at a time (however many letters that may be). I will also need to format individual words and phrases in various ways. My question is: do I build from scratch or enhance an existing text editor (TextBox, RichTextBox, FlowDocument, etc.)? If I use an existing control, I will get powerful features built in, but may run into design limitations--such as default line breaking--that will make it difficult to implement my requirements, or at least I may have to fight the default implementation. If I roll my own low level control, I have total control but I have to implement everything myself. How shall I make this decision?

May 19, 2025 - 12:30
 0
Should I build a custom text editor from scratch or enhance existing ones?

I'm developing a Windows WPF app that needs to edit a certain type of document and I need a highly customized editor to do so:

enter image description here

The text is a transcription of an audio feed, and I need to sync the the text with a time code of the corresponding word in the audio stream (red numbers on left). This may involve breaking text not at a carriage return (not actually present in my text), but based on a custom timing algorithm (as shown).

I also want custom cursor logic, for instance, having CTRL + -> jumping ahead 10 seconds at a time (however many letters that may be). I will also need to format individual words and phrases in various ways.

My question is: do I build from scratch or enhance an existing text editor (TextBox, RichTextBox, FlowDocument, etc.)?

If I use an existing control, I will get powerful features built in, but may run into design limitations--such as default line breaking--that will make it difficult to implement my requirements, or at least I may have to fight the default implementation.

If I roll my own low level control, I have total control but I have to implement everything myself.

How shall I make this decision?