@UKHeliBob spotted a new type of corruption of pasted content when using the "rich text editor":
The markup of the content looks like this:
```
Possible Tag Data: Header: 38 08, Data: 40 1A End: 3C FF
```
```
Extracted ID: 16410
```
```
```
```
Raw FDX-B: 38 08 38 58 FC 9E
```
```
```
At first it seems the same as the bug I described in post #2. However, it is significantly different. I am able to reproduce it through the following procedure:
- Copy some content from the Arduino IDE 2.x Serial Monitor.
- Put the post composer in the "rich text editor" mode.2.
- Paste the copied content into the composer.
When you copy text to the clipboard, it may be stored in a formatted form (text/html
) in addition to plaintext (text/plain
). When formatted text is available in the clipboard, the rich text editor formats the post accordingly.
If I copy the following text from Serial Monitor:
foo
bar
and then inspect the raw data inside the clipboard (this is a useful tool for that purpose), I see the following text/html
data:
<html>
<body>
<!--StartFragment-->
<div
style="
color: rgb(78, 91, 97);
font-family: monospace;
font-size: 13px;
font-style: normal;
font-variant-ligatures: normal;
font-variant-caps: normal;
font-weight: 400;
letter-spacing: normal;
orphans: 2;
text-align: start;
text-indent: 0px;
text-transform: none;
widows: 2;
word-spacing: 0px;
-webkit-text-stroke-width: 0px;
white-space: nowrap;
background-color: rgb(255, 255, 255);
text-decoration-thickness: initial;
text-decoration-style: initial;
text-decoration-color: initial;
position: absolute;
left: 0px;
top: 18px;
height: 18px;
width: 1852px;
"
>
<pre style="margin: 0px">
foo
</pre
>
</div>
<div
style="
color: rgb(78, 91, 97);
font-family: monospace;
font-size: 13px;
font-style: normal;
font-variant-ligatures: normal;
font-variant-caps: normal;
font-weight: 400;
letter-spacing: normal;
orphans: 2;
text-align: start;
text-indent: 0px;
text-transform: none;
widows: 2;
word-spacing: 0px;
-webkit-text-stroke-width: 0px;
white-space: nowrap;
background-color: rgb(255, 255, 255);
text-decoration-thickness: initial;
text-decoration-style: initial;
text-decoration-color: initial;
position: absolute;
left: 0px;
top: 36px;
height: 18px;
width: 1852px;
"
>
<pre style="margin: 0px">
bar
</pre
>
</div>
<!--EndFragment-->
</body>
</html>
So it actually makes sense for the forum to format the pasted content this way, since that is indeed what is indicated by the HTML. So this is more a bug in Arduino IDE, which is already being tracked here:
As with the other bugs, the content is correctly formatted when pasting into a code block:
- Copy some content from the Arduino IDE 2.x Serial Monitor.
- Put the post composer in the "rich text editor" mode.
- Click the "
" icon on the composer toolbar.
- Paste the copied content into the composer.