Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] When the content of the code block is too long, the class .cm-gap hides part of the code block content. #1558

Open
2 tasks done
Ligayu opened this issue Nov 12, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@Ligayu
Copy link

Ligayu commented Nov 12, 2024

Initial checklist

  • I agree to follow the code of conduct
  • I searched issues and discussions and couldn’t find anything (or linked relevant results below)

Problem

When I use the code block component codeBlockComponent and the code content is too long, the class .cm-gap hides part of the code block content.
This seems to be a configurable option for the CodeMirror editor, but how can I configure the codeBlockComponent to display the full content of the code block, so that no matter how much content there is, the cm-gap does not hide any content?
_e8dd81aa-a2bb-4a79-b599-a3ef1e9a29e5
_1d9bfc2f-e136-4502-b605-39ae08cec64c

Solution

The codeBlockConfig exposes configurable options.

Alternatives

null

@Ligayu Ligayu added the enhancement New feature or request label Nov 12, 2024
@Saul-Mirone
Copy link
Member

I've already exposed the codeBlockConfig.extensions from code mirror, could you please describe more precisely about how you want to configure codemirror?

@Ligayu
Copy link
Author

Ligayu commented Dec 20, 2024

https://discuss.codemirror.net/t/improve-scroll-performance-tradeoff/8825
From the above link, it seems that due to performance reasons, the new CodeMirror editor does not provide configuration options. The documentation I looked at some time ago for the older version seemed to offer configurable options, which is a bit awkward now. 😅

@Ligayu
Copy link
Author

Ligayu commented Dec 20, 2024

Since I want to obtain complete HTML DOM elements after editing multiple lengthy code blocks and display them on a webpage, if class ''.cm-gap'' hides some actual DOM elements, it will not be possible to get the complete HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants