Persistent text folding in editor

/*toggle arrow*/
.CodeMirror-guttermarker-subtle {

You'll need to share a screenshot as far as the triangle being on top of the #. I'm not seeing that.

Possible Bug? I'm using the line number plugin and when I click just to the right of the toggle triangle, I am able to toggle the period at the end of the line but the text doesn't actually fold. Not sure what is going on.

1 Like

Thanks for the help with the color change. Here's the screenshot.

Does that happen when you load Joplin with a completely empty userchrome.css?

No. When I opened Joplin after renaming userchrome to userchrome1, the small, grey triangle appears before the #. So I guess the problem is caused by my userchrome settings--which I wouldn't know how to fix since I'm just borrowing someone else's userchrome.css.

Sorry if all this is getting a bit off topic... My method for fixing things like this is to delete half of my css and see if I still have the problem. Then keep deleting half of whatever is problematic till I get down to what is actually causing it. half splitting troubleshooting. Once you find that you could post it here.


OK. Will try to find a solution using your method.

This is like a binary search or git bisect. Average: O(log n) :wink:

1 Like

Just pushed 1.2.5 to repository, this bug should be solved but please check on your setup.
Thanks for reporting.

Skim try this:

.CodeMirror-line {
padding-left: 10px !important;
	color:yellow !important

The padding-left in CodeMirror-line will help to move all content to the right while keeping markers in place (adjust 10px to length that will suit you).

It happens this way because markers aren't to the left of content but on top of it.

Perfect! Adding the padding info worked like a charm. Thank you!

1 Like

Spoke too soon. The triangle looks fine, but the padding line messes up the numbered outline beneath it.

Solved! Great work.

I think you must know this, but if you have a period at the end of a heading, toggling will remove them. If you have several then it won't toggle till all are removed.

1 Like

Is there any way that you can add some direction on here and Github on how to use this plugin for noobs? Basically, how would you explain it to someone who's never used this plugin before?

I know that I certainly am noobish, as I cannot figure out even how to make any folded text.

I use it for the more involved, long outlines (for shorter ones, I just use the numbered list).

I'm also a noob and know nothing about coding, but I think I can help you as a user.

To use it, you just need to use the # sign as heading markers. # for top level, ## for second level, ### for third level and so on. For example, try typing the following (without the quotation marks):

"# Vacation"
"## Day one"
"## Day two"
"### Morning"
"### Afternoon"

That's all you need to do. I don't think there are any settings in the plugin. The triangle to fold and unfold automatically show up if you have the plugin installed.


If this is still an issue, i've checked and there has to be something with the css of your instance of Joplin.
Having only the numbered lines plugin, folding plugin and added css i get:
Screenshot from 2021-04-21 22-05-49

Maybe post your CSS file here and we'll see what can be done.

I'm living with the "bug" without the code provided by @whitewall. Here's the userchrome.css. userchrome.css (9.8 KB)

I've looked into it and could only half reproduce it but do you use Rich Markdown plugin?
Especially this option:
Screenshot from 2021-04-22 17-26-15
If so try to disabling it and see it works for you.
If you don't want to disable it or you don't have Rich Markdown
try this css:

.CodeMirror-line {
padding-left: 10px !important;
.CodeMirror pre.CodeMirror-line, .CodeMirror pre.CodeMirror-line-like {
    padding-left: 10px !important;

Its a bit shot in the dark but for now its all i came up with.
Let's see if it fixes it.

Yes,i tried to make it work when there are many of dots but there is a delay between heading marking and its content being folded.
Basically plugin see content as always being folded (at a moment of click).

Using dot as indicator make switching nearly instant and consistent except for situation you wrote about. So its a trade off.

But thanks for rising the issue.

1 Like

Unchecking that option in the Rich Markdown plugin solved it. Thanks!

Just now for the first time I tried to search for something on a page that had folded text. Not surprisingly when the target text was in a fold, there was no way to go to it. (assuming I'm using the find correctly)

Don't have any idea how this could be fixed, but I thought I would mention it. For me, if there was an "unfold all" and "fold all" I could unfold, search, and fold again. But that may not be desirable for others.

I suppose one alternative would just be to open in an external editor and then search.



    Ctrl(or Cmd) + Alt + F to fold all
    Ctrl(or Cmd) + Alt + U to unfold all

@ambrt , I'm wondering if there is a change in the class of the header text when a heading is folded. I've tried using the inspector and can't figure it out.

I have added a margin to the top and bottom of .cm-header-1 and I'd like to remove it when a heading is collapsed.

Thanks for the plugin! I use it every day in my notes.