Two cars in collision on Bankagervej in 8700 Horsens. #press




This dialog asks the user if they want to use the existing image/video file or duplicate.
#dev #macOS #Swift #SwiftUI #AppKit
Next I should get the shortcuts working to insert new lines:
- `Cmd+Option+Up`: Insert line above
- `Cmd+Option+Down`: Insert line below
In the old Markdown rendering engine I also had images working, but this new version is a completely new implementation - none of the code is like before.
I decided to scratch my own implementation because even though my Markdown rendering engine was working as expected, I had some serious problems getting `NSTextView` and `TextKit2` to behave the way I wanted. For example, I was fighting a bug where it would apply the same styling to the last empty line as the text before it. Then I tried switching to `STTextView`, which did solve the bug, but had its own problem⦠It would crash the entire app as it caused an infinite loop bug because it was fighting #SwiftUI over the correct height of the textview. Therefore, the app kept recalculating the height which would eventually lead to a crash.
Link to the Markdown rendering engine I am using:
View quoted note β