Do not add heading levels when pasting into a non-empty line

Use case or problem

I like to copy / paste titles from web page into note so that I can find them in the future. When pasting titles into text, its heading level is added as ### syntax in the pasted text, but this isn’t useful when the content is put in the middle of other text, where the ### syntax has no special meaning and becomes just extra annoyance to remove.

Proposed solution

It should detect whether the heading is being pasted into an empty line. If the line is otherwise empty, it’s probably okay to continue preserve the ### prefix, otherwise that should be stripped even if the source is a heading.

Current workaround (optional)

No workaround, just remove the extra hash characters every time.

1 Like

One workaround is doing a “paste without formatting” via a Ctrl-Shift-V (or Cmd-Shift-V). This is what I do to get around this issue.

You can also deactivate Settings > Editor > “Convert pasted HTML to Markdown” if you don’t care about any other formatting in text that you paste from the web.

Thanks for your reply.

I’m aware of that shortcut, but the muscle memory is just Ctrl-V so most of the time I forgot to use that. Also the heading prefix is useless in such context anyway.

Thanks for your suggestion, it is very useful.

I’d say most of time I don’t care about formatting in text that I paste from the web, but occasionally I do. It’s probably 10:1 or so. That says, it would likely be much more helpful if there is an option that, instead of disabling the conversion altogether, just swap the two shortcuts.

Yes, I only want it occasionally too and would like that. I haven’t looked to see if there is a feature request for it.