Fold lines in reading view

As for live preview, I know we can fold/collapse a range of lines using CodeMirror 6’s foldService. But how can we do the same thing in reading view?

I searched the docs, and asked on Discord but got no luck. I appreciate it if someone could help me. Thanks!

If it’s folding on a header you could target the DOM element containing the header and send a click().

Thank you for the reply, but actually that’s not what I want to do…

To be specific, I want to fold the lines between the two inline codes `begin` and `end` in the example below.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor 

`begin`
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
`end`

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor