• Re: PSA: HTML fragment mode interaction between Chromium, Clipboard & N

    From Carlos E. R.@3:633/10 to All on Tue Feb 10 13:33:44 2026
    Subject: Re: PSA: HTML fragment mode interaction between Chromium, Clipboard & Notepad++

    On 2026-02-10 13:17, Maria Sophia wrote:

    ...

    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 is a very old Windows feature. It is up to the receiving
    application to choose what version to paste.

    With a clipboard manager perhaps you can choose the version yourself.

    --
    Cheers,
    Carlos E.R.

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Paul@3:633/10 to All on Tue Feb 10 07:55:44 2026
    Subject: Re: PSA: HTML fragment mode interaction between Chromium, Clipboard & Notepad++

    On Tue, 2/10/2026 7:17 AM, Maria Sophia wrote:
    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.

    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.

    *******

    https://stackoverflow.com/questions/35827764/how-to-know-the-type-of-data-in-clipboard-through-python

    import win32clipboard as clipboard # Example in Python, version unknown
    def getTheClipboardType():
    formats = []
    clipboard.OpenClipboard()
    lastFormat = 0
    while True:
    nextFormat = clipboard.EnumClipboardFormats(lastFormat)
    if 0 == nextFormat:
    # all done -- get out of the loop
    break
    else:
    formats.append(nextFormat)
    lastFormat = nextFormat
    clipboard.CloseClipboard()
    return formats

    Example output:
    [13, 1, 49427, 49953, 49422, 49304, 16, 7]

    *******

    Whereas the "Windows way" is to "ask" for a format, without
    enumerating what formats are available.

    *******

    Here is the "Hah!" moment.

    https://learn.microsoft.com/en-us/windows/win32/dataxchg/clipboard-formats

    "A window can place more than one object on the clipboard, each
    representing the same information in a different clipboard format.

    Users need not be aware of the clipboard formats used for an object on the clipboard. <=== Hah!
    "

    "To find out how many formats are currently used on the clipboard,
    call the CountClipboardFormats function."

    There is your problem definition.

    If you "copy" three files in Explorer file manager, then
    three items of "filesystem" type or so, are on there. Notepad++
    should not respond to such a clipboard format. But it is possible
    to extract the text strings from that.

    Paul

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Carlos E. R.@3:633/10 to All on Tue Feb 10 14:33:49 2026
    Subject: Re: PSA: HTML fragment mode interaction between Chromium, Clipboard & Notepad++

    On 2026-02-10 13:55, Paul wrote:
    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.

    I think it goes back to Windows 3, I remember reading technical
    documents about it. I also think that the source application can put the metadata on the clipboard, but delays putting the actual data till the
    client actually requests it. Imagine pasting a picture in several large formats, it is expensive to store all format choices there.


    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?

    --
    Cheers,
    Carlos E.R.

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Paul@3:633/10 to All on Tue Feb 10 10:01:48 2026
    Subject: Re: PSA: HTML fragment mode interaction between Chromium, Clipboard & Notepad++

    On Tue, 2/10/2026 8:33 AM, Carlos E. R. wrote:
    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?

    That's a reference to source code you could use for the purpose.
    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.

    Paul

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Carlos E. R.@3:633/10 to All on Tue Feb 10 18:10:39 2026
    Subject: Re: PSA: HTML fragment mode interaction between Chromium, Clipboard & Notepad++

    On 2026-02-10 16:01, Paul wrote:
    On Tue, 2/10/2026 8:33 AM, Carlos E. R. wrote:
    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?

    That's a reference to source code you could use for the purpose.
    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.

    I remember reading references to clipboard managers, long ago. Maybe one
    by PC Magazine? Or maybe payware.

    --
    Cheers,
    Carlos E.R.

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Hank Rogers@3:633/10 to All on Wed Feb 11 17:48:30 2026
    Subject: Re: PSA: HTML fragment mode interaction between Chromium, Clipboard & Notepad++

    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.



    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Hank Rogers@3:633/10 to All on Wed Feb 11 18:26:04 2026
    Subject: Re: PSA: HTML fragment mode interaction between Chromium, Clipboard & Notepad++

    Hank Rogers wrote on 2/11/2026 5:48 PM:
    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.




    Say Maria, you really work hard on this. Is there a way we can pay to
    keep your shit going? Do you have a paypal account we can send money
    to? I realize you like to operate as a secret agent using super
    privacy, so it's probably never possible. Just asking anyway.

    You are very secretive, like mission impossible ... Makes it very
    exciting for us normal people who are not double naught spies like you!

    Be careful out there!


    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Carlos E. R.@3:633/10 to All on Thu Feb 12 21:03:10 2026
    Subject: Re: PSA: HTML fragment mode interaction between Chromium, Clipboard & Notepad++

    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.

    ...

    --
    Cheers,
    Carlos E.R.

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Hank Rogers@3:633/10 to All on Thu Feb 12 14:25:15 2026
    Subject: Re: PSA: HTML fragment mode interaction between Chromium, Clipboard & Notepad++

    Carlos E. R. wrote on 2/12/2026 2:03 PM:
    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.

    ...


    I believe he is psychotic.



    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Carlos E. R.@3:633/10 to All on Fri Feb 13 22:25:18 2026
    Subject: Re: PSA: HTML fragment mode interaction between Chromium, Clipboard & Notepad++

    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.

    --
    Cheers,
    Carlos E.R.

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Hank Rogers@3:633/10 to All on Fri Feb 13 17:59:26 2026
    Subject: Re: PSA: HTML fragment mode interaction between Chromium, Clipboard & Notepad++

    Carlos E. R. wrote on 2/13/2026 3:25 PM:
    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.


    He is hopelessly psychotic, and will never recover. Sad.



    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Hank Rogers@3:633/10 to All on Fri Feb 13 18:07:17 2026
    Subject: Re: PSA: HTML fragment mode interaction between Chromium, Clipboard & Notepad++

    Carlos E. R. wrote on 2/13/2026 3:25 PM:
    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.


    Drugs and electroshock therapy could tone him down for a while. It
    would help us, but not him. He needs help, but there is none. Current medical knowledge can't help poor arlen.

    Since he is a savant, maybe he can teach us something before his demise.
    So far, though, its only gibberish.


    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Hank Rogers@3:633/10 to All on Fri Feb 13 18:33:35 2026
    Subject: Re: PSA: HTML fragment mode interaction between Chromium, Clipboard & Notepad++

    Maria Sophia wrote on 2/13/2026 6:24 PM:

    For you, Arlen, EVERYONE is a troll. You are psychotic. I wish I could
    help you, but you need a close personal psychiatrist to guide you. Good
    luck.


    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Carlos E. R.@3:633/10 to All on Sat Feb 14 02:29:30 2026
    Subject: Re: PSA: HTML fragment mode interaction between Chromium, Clipboard & Notepad++

    On 2026-02-14 01:24, Maria Sophia wrote:
    Carlos E. R. wrote:
    I'll abstain from expressing an opinion now.

    Hi Carlos,

    ÿ*PLEASE STOP TROLLING THIS NEWSGROUP WITH YOUR CONSPIRACY THEORIES*

    If you start insulting me, I stop reading. What the heck are you talking about, conspiracy theories?

    PLONK.


    --
    Cheers,
    Carlos E.R.
    ES??, EU??;

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)