While teaching (e.g., creating assignments), I like to include <details> blocks in my RMarkdown documents. This creates the hidden/collapsible chunks for things like hints and answer keys. This works well in the source editor, but when I try to move between the code editor and the new visual editor, it keeps breaking my lines up. Example:
In source editor, I type:
<p><details><summary>Hint</summary>Here is a hint</details></p>
Then I go to the visual editor view and then back again to the source editor and it shows:
<p>
<details>
<summary>
Hint
</summary>
Here is a hint
</details>
</p>
As a result of these extra linebreaks, the display in my knit document is wrong:
With visual editor you need to include a raw HTML block when you want to use directly HTML in your document. With visual editor, it is in the command palette or menu