Wrap long code lines in Logseq inside the Src ``` code ``` block

Currently a long src block has to be scrolled:


This feature request would make it multiline representation, that fits to the screen, something like this:

Solution to change logseq custom css file (under Settings>General>Edit custom.css ) or under the folder logseq->custom.css

/* Wrap the content inside code blocks in all themes */
pre, code {
  white-space : pre-wrap !important;
}
1 Like

Hello, I notice a better solution today, similar topic via: Make it easy to configure syntax highlighting theme?

The logseq pull request is Feature: add codemirror options by andelf · Pull Request #3699 · logseq/logseq · GitHub

Adding those code to your config.edu in setting.

:editor/extra-codemirror-options 
  { :lineWrapping true }

They have many other options, and that’s make more sense than custom css (such as pointer shown).

3 Likes