3 ms·
Yeah IDK. Wordpad is built around rich text, with all the weirdness and complexity that comes with it. I know for a fact that .rtf is absurdly complicated to wo
by brokencode 7mo ago
Yeah IDK. Wordpad is built around rich text, with all the weirdness and complexity that comes with it. I know for a fact that .rtf is absurdly complicated to work with, and I assume that .docx is similar.
I’m willing to bet that adding markdown to Notepad was a lot simpler than trying to make it work in Wordpad, especially since you’d probably still have to support rich text.
- deleted 7mo ago[deleted]
- alansaber 7mo agoHence why I use .txt and not .rtf (After having multiple RTF files become corrupted)
- westurner 7mo agoSyntax highlighting is definitely less complex than updating and rendering RTF and HTML. There is configurable syntax highlighting in vscode. Should an app like Notepad ever embed a WebView? (with e.g. tauri-apps/wry instead of CEF now FWIU)? Not even for a Markdown Preview feature IMHO.
- canucker2016 7mo agoBoth Wordpad and Win11-Notepad use the RichEdit control (which first appeared in Win95, brought to you by the Mail client group aka Capone - cuz no one else wanted to do a RichEdit text control). see https://devblogs.microsoft.com/math-in-office/windows-11-notepad/ https://devblogs.microsoft.com/math-in-office/windows-11-not... and https://learn.microsoft.com/en-us/cpp/mfc/rich-edit-control-examples?view=msvc-170 https://learn.microsoft.com/en-us/cpp/mfc/rich-edit-control-... The RichEdit control handles parsing RTF (I believe there was a CVE-level bug about RTF-handling in RichEdit - ahh - here we go https://www.kb.cert.org/vuls/id/368132/ https://www.kb.cert.org/vuls/id/368132/), the programmer/app is insulated from grokking RTF. Here's sample code for opening an RTF file - https://learn.microsoft.com/en-us/windows/win32/controls/use-streams https://learn.microsoft.com/en-us/windows/win32/controls/use... Adding realtime conversion of text-only Markdown to the processed-richtext Markdown is slightly more difficult than an instant message-type edit control converting a text :) to a unicode emoji character representing :) You'd have some bookkeeping to remember which lines are markdown and which are plain text. But it's not rocket science. Imagine Win11-Notepad as WordPad with all the UI for rich text formatting disabled.
- projektfu 7mo agoI think I remember RichEdit from Windows 3.1, but maybe it was always installed with the OLE common controls and not shipped with the OS.
- canucker2016 7mo agoThe RichEdit control was first shipped in Win95. Exchange 4.0 email client app (shipped in 1996) had a Win16-bit version which included RichEdit. see https://learn.microsoft.com/en-us/archive/blogs/murrays/richedit-versions https://learn.microsoft.com/en-us/archive/blogs/murrays/rich...
- projektfu 7mo agoCheers, thanks