Live data from Hacker News

Windows 11 Notepad to support Markdown

blogs.windows.com

361–370 of 558 posts

Re: Windows 11 Notepad to support Markdown

#361

Earlier quoted context omitted.

Makes me wonder - with Notepad rapidly evolving into WordPad v2, and no default "just render bytes as text" solution in modern Windows to replace it, maybe there's still a way to hack one together on the go, just from pieces laying around in every default installation? I mean, rundll32.exe is a thing. All I really need is a basic text box with a scroll bar, and a way to feed it with bytes from a file. To make it a we…

Dave Plummer vibe coded one on his YouTube channel a couple months ago. Normally I wouldn’t share someone vibe coding something, but since he wrote the Task Manager, Zip Folders, and other such core Windows features back in the day, it hits different. https://youtu.be/bmBd39OwvWg

Amazing, thanks for sharing! This kind of vibe-coding I'm happy to watch.

Re: Windows 11 Notepad to support Markdown

#362

step 1: remove wordpad step 2: omg there's demand for features step 3: turn notepad, whose point was to be a dumb simple thing, into a wordpad step 4: get a raise because you "solved" the problem

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.

Both 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-not... and 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/), 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...

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.

Re: Windows 11 Notepad to support Markdown

#363

Earlier quoted context omitted.

I thought it is by introducing an RCE vulnerability that you get an RCE vulnerability. I'm being facetious of course, but this recent rhetorical trend of people confidently vouching for "pet" in "pet vs. cattle" is not a sustainable decision, even if it's admittedly plain practical on the short to medium run, or in given contexts even longer. It's just a dangerous and irresponsible lesson to blindly repeat I think. C…

> * Small note on this specific CVE though: to the extent I looked into it [0], I'm not sure I find it reasonable to classify it as an RCE. It was a UX hiccup, the software was working as intended, the intention was just... maybe not quite wise enough. Most people seem to see "CVE" and "RCE" and assume the worst here. As you saw though, Notepad is just making totally valid URIs clickable! Web browsers allow it too -…

Thats not the case here.

Web browsers warn you about opening arbitrary protocols. And you have to select the program that will open it.

This Notepad vuln, allows you to click things like ssh://x....

Re: Windows 11 Notepad to support Markdown

#366

They’re turning Notepad into what Wordpad was (or was supposed to be). Now everyone looking for the light weightiest *.txt editor must find a new tool...

The problem is usually when you're using notepad, it's in some situation where you don't want to install another exe. Like you're using someone else's PC or a random one in a library or something. This needs to be built in.

So build it in Wordpad?

Re: Windows 11 Notepad to support Markdown

#367
Ironic how Notepad used to be too simple, making it useless as a text editor in many cases. In particular, it didn't support UNIX line endings and files larger than a few MB.

The there was a brief moment where it became decent. Still a barebones text editor, but it could actually edit text, what I think most people expected Notepad to be.

And now, it is going the other way, with "AI" features no one wanted, and also "Markdown support" which is ironic since Markdown is designed to look good in a regular text editor. Now we have something that isn't really a text editor, but not really a wysiwyg editor either, it has some advanced features like AI, but is lacking features most other semi-advanced text editors have (ex: syntax highlighting).

At least, it was good for a couple of years.

Re: Windows 11 Notepad to support Markdown

#368
post #270
post #75

Earlier quoted context omitted.

Notepad.exe used to be <200kB. Emacs is tens of megabytes

Notepad was just a wrapper around some default win32 controls. Judging alone by exe size is not right, although probably a “statically linked” notepad would still be smaller than emacs

It is right by definition. Link emacs to those controls, shed some statically linked weight, and it will also become lighter!

Re: Windows 11 Notepad to support Markdown

#369
A lot of comments about how this is another case of useless bloat. I don't know, markdown is just incredibly useful and widespread and yet it is pretty annoying to find a good editor:

- There wasn't anything that comes with Windows that natively supports it (before now)

- All your favorite text editors don't support it natively, and plugins vary

- You can pay for a nice markdown editor but for some reason your more powerful usual text editor is still free?

- You can open VSCode, which is hilarious overkill if you just want to take some notes. Obsidian is excellent but same problem.

- Maybe something I'm missing?

Basically I think it is a great thing if I just get a lightweight markdown friendly editor built in, because I'll probably use it all the time.

...except if it immediately leads to a CVE, I guess.

Re: Windows 11 Notepad to support Markdown

#370
post #162
post #102

I was about to make a joke about how I'm surprised they haven't shoved Copilot into Notepad yet, but surprise - they have ( https://support.microsoft.com/en-us/windows/enhance-your-wri... )

This might be the reason for Markdown support, LLMs love it.

I love it too, because it's easy to write and copy, compared to formatted text
Post reply on HN