Support block codes

textediting

#1

Are there any plans to support inline code/block codes like markdown? :slight_smile:


#2

We already support both a Preformatted paragraph style as well as a Fixed Width inline-style. Are you looking for anything specific in addition, like syntax highlighting etc?


#3

yes, it will be great if you can support syntax highlighting.


#4

Both preformatted and Fxed Width, behave on a unexpected way when I think about code-related notes.

They do serve they purpouse, but is not as intuitve as typing inline code that I want or

const code = () => {
   // something
}

using just the " ` " character. also bonus point to code hightlight :grin:


#5

We do support the markdown backticks for inline code, i.e.:

`some inline code`

should result in:
some inline code

We don’t support yet the triple ``` to start a Preformatted paragraph style I believe, @drewmccormack


#7

Yes, you can just use back-ticks for fixed width (inline) code. For preformatted, you can select the style first, and then, eg, paste in to get a code block.

We will think about how we might support the three backticks option. Could perhaps be a command.


#8

Yeah the inline block works with only one backtick. thanks for all the anwsers! :slight_smile:

Another suggestions is make the inline code/block code more easy to spot (like here we have a different background) this make easy to spot and find blocks.

Thanks again! :v:


#9

The preformatted type does indent, and use a different font, so is quite visible. Inline is just a different font.

Thanks for the feedback!


#10

I’d love to be able to go into preformatted type by typing ``` and then return to go into code block mode, just like in DayOne, GitHub, Typora etc.

Also syntax highligthing for vairous languages would be nice, but the addition above should be fairly simpel :slight_smile:


#11

Thanks for the feedback. I did look into this. It is not quite as simple as it seems in our system, but we are would like to add something like this. Thanks!


#12

Nothing is ever “fairly simple” right? :grin:


#13

Just added this. Next release will support this. If you type ``` and a space, you will be in preformatted mode.


#14

Great! Sounds good and intuitive :blush: