When you copy text from any Chromium-based application, Apparently Windows does not just copy plain text. Windows actually puts two versions of the
text on the Windows clipboard:
1. a normal plain-text version
2. a hidden HTML-formatted version
PSA: HTML fragment mode interaction between Chromium, Clipboard & Notepad++
There is a confusing interaction between Chromium-based applications when copying to the Windows clipboard and then pasting into Notepad++ that can break basic editing functions like Select All (Ctrl+A).
What happens is the following sequence:
a. You copy Chromium-based text (Ctrl+C) to the Windows clipboard
b. You paste that into Notepad++
c. You try to select all (Ctrl+A)
What happens is the selection flashes, but nothing is selected
If you add a blank line at the top, then Ctrl+A works as expected.
It took me a long time to track this very repeatable artifact down, so I am sharing the explanation here for anyone else who runs into it.
When you copy text from any Chromium-based application, Apparently Windows does not just copy plain text. Windows actually puts two versions of the
text on the Windows clipboard:
1. a normal plain-text version
2. a hidden HTML-formatted version
This apparently happens with Chrome, Edge, Brave, Vivaldi, and many
Electron apps such as Slack, Discord, and VS Code.
When we paste that clipboard data into Notepad++, Notepad++ sees the hidden HTML version and Notepad++ assumes the paste is part of a larger HTML fragment. That puts Notepad++ into a strange internal state, which is apparently sometimes called "HTML fragment mode".
In this mode:
a. Ctrl+A will not select the whole document
b. Therefore, Ctrl+X will not cut anything
c. Because the Ctrl+A selections are behaving incorrectly
What took me a while to figure this out was that this artifact has nothing
to do with the text itself so a hex editor does not show the artifact.
It is simply how Notepad++ reacts to the Windows clipboard format used by Chromium-based applications.
The workaround I've come up with is surprisingly simple: a. Insert an extraneous leading blank line at the top of the document
b. Now when you press Ctrl+A, the selection works as expected
c. Copy (Ctrl+C) or Cut (Ctrl+V) the selected text, as desired
d. Then delete the extraneous leading blank line
That tiny change of the extraneous blank line apparently forces Notepad++
to abandon HTML fragment mode and treat the text as normal again.
Q: Why does deleting the blank line work around this issue successfully? A: Because the hidden HTML fragment boundary is treated as if it were
ÿ the first line of the document. Deleting the first line removes that
ÿ invisible boundary and resets the buffer.
Summary:
A. Chromium apps (apparently) copy hidden HTML to the clipboard.
B. Notepad++ sees that artifact and enters HTML fragment mode.
C. There is no indication whatsoever you're in HTML fragment mode!
D. But in that mode, Ctrl+A stops working correctly.
E. Yet, inserting a blank line resets Notepad++ back to normal.
If you have ever pasted something into Notepad++ and wondered why you suddenly cannot select or cut the text, this artifact might just be why.
On Tue, 2/10/2026 7:17 AM, Maria Sophia wrote:
PSA: HTML fragment mode interaction between Chromium, Clipboard & Notepad++
As I understand it, the Clipboard can have multiple representations
on it at one time. Sometimes a person pastes into Notepad.exe and
then copies a text again, as a means of "cleaning" any multi-item
clipboards.
What you need in hand, is a clipboard viewer, to see what is on offer
and what Notepad++ may have accessed as its choice. So far, I have not spotted the "perfect" chunk of code for this.
On 2026-02-10 13:55, Paul wrote:
What you need in hand, is a clipboard viewer, to see what is on offer
and what Notepad++ may have accessed as its choice. So far, I have not
spotted the "perfect" chunk of code for this.
Ah, no perfect clipboard app yet?
On Tue, 2/10/2026 8:33 AM, Carlos E. R. wrote:
On 2026-02-10 13:55, Paul wrote:
That's a reference to source code you could use for the purpose.What you need in hand, is a clipboard viewer, to see what is on offer
and what Notepad++ may have accessed as its choice. So far, I have not
spotted the "perfect" chunk of code for this.
Ah, no perfect clipboard app yet?
There is a Powershell example or two, but they follow the same
"Windows reasoning", that a user does not need to know what
is on the clipboard.
There may be a finished App for $39.95 to do it.
There are various "laundering recipes" for fixing issue like that.
Presumably this Notepad++ behavior has already been noted (somewhere).
It would be unusual for "bad manners" to go unacknowledged.
Maria Sophia wrote:
I have to force Notepad++ to rebuild the macro action list.
1. Open Notepad++ without shortcuts.xml in any editor.
2. Go to Macro? ->? Modify Shortcut / Delete Macro
3. Find the macro in the list & select it.
4. Click "Delete" & then close Notepad++ completely 5. Open
shortcuts.xml in gVim (or any editor that is NOT Notepad++).
6. Paste the original macro back into shortcuts.xml.
?? Make sure the U+2060 removal block is the very first Action
?? in the entire macro, before any other Action.
7. Save the file making sure nothing else related is running.
8. Start Notepad++ again and re-run the grueling test.
OMG. Give me a gun. I want to shoot Scintilla's developers! :)
(just kidding)
But I am frustrated... as they wasted my valuable time.
I finally figured out WHY Notepad++ wasn't running the macros in the
order I wrote them.
I had to FORCE Notepad++ to rebuilt the entire macro from scratch!
Then it worked fine in the same testcase it's been failing on.
Jesus Christ. That's NOT intuitive. It's only intuitive AFTER you
realize Notepad++ is rewriting
the shortcuts.xml (keeping only your comments of what you add).
Who knew?
Not me. Now I do!
Notepad++ does NOT execute macros directly from shortcuts.xml.
Once I forced it to read macros from shortcuts.xml... Apostrophes are working.
Zero-width characters too.
Combining marks also.
Double quotes, dashes, symbols and diacritics are working.
So are invisible operators.
Soft hyphen & line separators
Even the Multi-word stress test is working.
As is the mixed-chaos jumbled test.
And yet, I changed nothing in the shortcuts.xml file!
Jesus Christ.
There was nothing wrong with the programming on my side.
It was all because Notepad++ doesn't do what we think it does.
Sheesh. Drives me nuts when I can't solve a problem.
As I almost never fail - so it was driving me nuts.
Mainly because I didn't understand what was happening.
My "logic" was fine (as I'm extremely logical).
It was simply that I was blindsided by Notepad++ changing the order.
Without telling me it changed the order.
By deleting the macro, the macro was finally rebuilt internally.
Notepad++ finally loaded the new action order
U+2060 finally executed first!
When Notepad++ starts, it reads shortcuts.xml ONCE.
It loads all macros into an INTERNAL ARRAY in memory.
After that, the XML file is ignored.
Only when we edit shortcuts.xml while Notepad++ is closed,
does the next startup load the new version... but... but...
But...
If the XML structure is malformed,
or the macro is outside the <Macros> block,
or the <Macros> block is empty,
or Notepad++ rewrites the file,
or the macro name changes,
or the macro is deleted and not recreated,
then Notepad++ will:
silently discard the macro,
rebuild the XML in its own structure,
and load the LAST VALID INTERNAL VERSION it had.
This looks like"Notepad++ is using an old cache.
But it's not a cache.
It's the internal macro array
Deleting the macro inside Notepad++ clears the internal array.
I'm out of energy for today, but I will try to build a version 4.0
(v4p0) that Notepad++ cannot reorder internally.
Maria Sophia wrote on 2/11/2026 5:37 PM:
Maria Sophia wrote:
I have to force Notepad++ to rebuild the macro action list.
1. Open Notepad++ without shortcuts.xml in any editor.
2. Go to Macro? ->? Modify Shortcut / Delete Macro
3. Find the macro in the list & select it.
4. Click "Delete" & then close Notepad++ completely 5. Open
shortcuts.xml in gVim (or any editor that is NOT Notepad++).
6. Paste the original macro back into shortcuts.xml.
?? Make sure the U+2060 removal block is the very first Action
?? in the entire macro, before any other Action.
7. Save the file making sure nothing else related is running.
8. Start Notepad++ again and re-run the grueling test.
OMG. Give me a gun. I want to shoot Scintilla's developers! :)
(just kidding)
But I am frustrated... as they wasted my valuable time.
I finally figured out WHY Notepad++ wasn't running the macros in the
order I wrote them.
I had to FORCE Notepad++ to rebuilt the entire macro from scratch!
Then it worked fine in the same testcase it's been failing on.
Jesus Christ. That's NOT intuitive. It's only intuitive AFTER you
realize Notepad++ is rewriting
the shortcuts.xml (keeping only your comments of what you add).
Who knew?
Not me. Now I do!
Notepad++ does NOT execute macros directly from shortcuts.xml.
Once I forced it to read macros from shortcuts.xml... Apostrophes are
working.
Zero-width characters too.
Combining marks also.
Double quotes, dashes, symbols and diacritics are working.
So are invisible operators.
Soft hyphen & line separators
Even the Multi-word stress test is working.
As is the mixed-chaos jumbled test.
And yet, I changed nothing in the shortcuts.xml file!
Jesus Christ.
There was nothing wrong with the programming on my side.
It was all because Notepad++ doesn't do what we think it does.
Sheesh. Drives me nuts when I can't solve a problem.
As I almost never fail - so it was driving me nuts.
Mainly because I didn't understand what was happening.
My "logic" was fine (as I'm extremely logical).
It was simply that I was blindsided by Notepad++ changing the order.
Without telling me it changed the order.
By deleting the macro, the macro was finally rebuilt internally.
Notepad++ finally loaded the new action order
U+2060 finally executed first!
When Notepad++ starts, it reads shortcuts.xml ONCE.
It loads all macros into an INTERNAL ARRAY in memory.
After that, the XML file is ignored.
Only when we edit shortcuts.xml while Notepad++ is closed,
does the next startup load the new version... but... but...
But...
If the XML structure is malformed,
or the macro is outside the <Macros> block,
or the <Macros> block is empty,
or Notepad++ rewrites the file,
or the macro name changes,
or the macro is deleted and not recreated,
then Notepad++ will:
silently discard the macro,
rebuild the XML in its own structure,
and load the LAST VALID INTERNAL VERSION it had.
This looks like"Notepad++ is using an old cache.
But it's not a cache.
It's the internal macro array
Deleting the macro inside Notepad++ clears the internal array.
I'm out of energy for today, but I will try to build a version 4.0
(v4p0) that Notepad++ cannot reorder internally.
Thats a damn shame maria.
Doing my part to ignore insults from those who can never add value,
but who feel desperate to post something (anything!) for some odd reason,
the summary below explains (to the best of my knowledge) what happened.
On 2026-02-12 20:49, Maria Sophia wrote:
Doing my part to ignore insults from those who can never add value,
but who feel desperate to post something (anything!) for some odd reason,
the summary below explains (to the best of my knowledge) what happened.
Arlen, he is not insulting you.
You make a choice to change your name frequently. It is your choice, but
it is a fact that this is bad manners towards us. You do not like we
tell you this, sure, but we are not insulting you. We are just stating a fact that you don't like.
...
On 13/02/2026 6:49 am, Maria Sophia wrote:
Doing my part to ignore insults from those who can never add value,
but who feel desperate to post something (anything!) for some odd reason,
the summary below explains (to the best of my knowledge) what happened.
SORRY!!
Quoting me ....
I wish He/She/It WOULD keep His/Her identity SECRET by NOT changing it
every six - twelve months to beat other peoples (ME) trying to filter
those post to the big bit bucket!!
End Quote
Where did I insult you, .... all I did say was that I wished YOU
wouldn't keep changing your NYM ... thereby routing other posters
attempts to block you.
Am I wrong?? Why DO you change YOUR Nym sooooo often??
On 2026-02-13 09:23, Daniel70 wrote:
On 13/02/2026 6:49 am, Maria Sophia wrote:
Doing my part to ignore insults from those who can never add value,
but who feel desperate to post something (anything!) for some odd
reason,
the summary below explains (to the best of my knowledge) what happened.
SORRY!!
Quoting me ....
I wish He/She/It WOULD keep His/Her identity SECRET by NOT changing it
every six - twelve months to beat other peoples (ME) trying to filter
those post to the big bit bucket!!
End Quote
Where did I insult you, .... all I did say was that I wished YOU
wouldn't keep changing your NYM ... thereby routing other posters
attempts to block you.
Am I wrong?? Why DO you change YOUR Nym sooooo often??
Look in comp.mobile.android for a post named "Happy New Year. It's
January 1st. I'm changing the moniker on my accounts"
I don't remember in which post he claimed that he shifts names in order
to thwart robot searchers, to keep his privacy. Maybe it was some other
post prior to this one.
I'll abstain from expressing an opinion now.
On 2026-02-13 09:23, Daniel70 wrote:
On 13/02/2026 6:49 am, Maria Sophia wrote:
Doing my part to ignore insults from those who can never add value,
but who feel desperate to post something (anything!) for some odd
reason,
the summary below explains (to the best of my knowledge) what happened.
SORRY!!
Quoting me ....
I wish He/She/It WOULD keep His/Her identity SECRET by NOT changing it
every six - twelve months to beat other peoples (ME) trying to filter
those post to the big bit bucket!!
End Quote
Where did I insult you, .... all I did say was that I wished YOU
wouldn't keep changing your NYM ... thereby routing other posters
attempts to block you.
Am I wrong?? Why DO you change YOUR Nym sooooo often??
Look in comp.mobile.android for a post named "Happy New Year. It's
January 1st. I'm changing the moniker on my accounts"
I don't remember in which post he claimed that he shifts names in order
to thwart robot searchers, to keep his privacy. Maybe it was some other
post prior to this one.
I'll abstain from expressing an opinion now.
Carlos E. R. wrote:
I'll abstain from expressing an opinion now.
Hi Carlos,
ÿ*PLEASE STOP TROLLING THIS NEWSGROUP WITH YOUR CONSPIRACY THEORIES*
| Sysop: | Tetrazocine |
|---|---|
| Location: | Melbourne, VIC, Australia |
| Users: | 15 |
| Nodes: | 8 (0 / 8) |
| Uptime: | 234:19:51 |
| Calls: | 207 |
| Files: | 21,502 |
| Messages: | 83,204 |