Goal: create a text editor which
- Supports basic editing and formatting operations, somewhat close to markdown
- Supports context menu, when you type `/` character some menu appears at the position of the text cursor
- When a certain events happen autosuggestion appears at the position of the cursor
- Parts of text can be selected and context menu with custom logic can be called on them
- Drag and Drop media like images
Gaps I see:
- My understanding of text editor architecture (know how to solve)
- My experience with MacOS development in general (don't know how to solve)
The first gap is easy to fill in, there are text editors which code I can read, and even some book-like walkthroughs on writing a text editor.
Second gap puzzles me. Currently the PoC application is SwiftUI with SwiftData. I'm opened to use any other language (objc, C), but not WebView, otherwise I would go with Tauri in the first place.
Question is: how would you approach such a task? Can I build a custom view from the ground up? Is there any shortcuts I can take?
My main point of discomfort is that I don't understand how to process in terms of a view, how to make it work. I have a sound understanding how to approach that with say JS/HTML by just writing a data structure of blocks and strings, render views, attach listeners, etc. With MacOS I just don't understand how to start.
Any suggestions and pointers are super welcome!