Steps to reproduce
Say you want to embed a youtube video as an iframe and have links to timestamps in that video. 1 technique is to set the target
attribute of a bare HTML
anchor tag.
<iframe src="https://www.youtube.com/embed/Wf6N1rT42wI" name = "myIframe"></iframe>
<a href="https://www.youtube.com/embed/Wf6N1rT42wI?t=60" target="myIframe">Link Text</a>
Expected result
The outerHtml
of the rendered anchor tag should match the html as it was typed (ie the markdown parser shouldn’t do anything to the html.
Actual result
Opening dev tools, it looks like the markdown preview mode render overwrites target
and rel
<a href="http://www.wikipedia.org/" target="_blank" rel="noopener">Link Text</a>
The iframe is rendered with name="myIframe"
intact
Environment
-
Operating system:
macOS 11.1 -
Obsidian version:
v0.10.8