Best way to paste blocks {code, quote} into Bike 2 Preview?

Is there a best practice if we want to paste code as data-type=code rows,
rather than as <p><code></p></code> formatted data-type=body rows ?

(and in parallel, is there a way of pasting quoted material as data-type=quote rows ?)


If, for example, my clipboard contains 30 lines of code, and I paste into Bike 2.0 Preview (270), I do get well displayed code.

It tends, I think, to consist in Bike of a series of rows of body type, with code highlighting. Sometimes, however, I seem to have succeeded in creating a series of rows of code type, rather than highlighting.

But I think I’m missing the pattern, or failing to design the experiment carefully enough …

( Should I just be sketching a small extension command ? )


Intuitively, I find myself wanting to apply Format > Row > Code Block, or Format > Row > Blockquote to an existing blank line, and then paste with that line selected.

Is this markdown on the clipboard? What path are you using when pasting? Normal paste, or Paste and Render Markdown?

Not a specifically Markdown clipboard – just code and normal paste.

Perhaps I should enclose my code clipboards with MD fences ?


UPDATE

Trying that (including an MD code fence, and using Edit > Paste and Render Markdown) seems to produce more or less the same result:

  • Code fence rows are included in the paste
  • formatting is <p><code></code></p> (rather than data-type="code")
1 Like

Ah, I now see that I introduced a bug in Paste and Render Markdown in recent release. Need to fix that, and then the path for copy of:

> one
> two
> three

Followed by Paste as Markdown … that path should insert block quotes. Or code if it was code formatted it would insert Code Blocks, Etc.

1 Like

271 release should understand Paste and Render Markdown again.

There’s more that could be done re paste code, etc. But it starts to get a bit complex… trying to detect users intent … do they want to continue formatting in outline, or do they want formatting all come from pasteboard.

I think for the foreseeable future it will not try to continue any formatting on paste.

1 Like