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

Treatment of <code> blocks #96

Open
stevengharris opened this issue Mar 13, 2023 · 0 comments
Open

Treatment of <code> blocks #96

stevengharris opened this issue Mar 13, 2023 · 0 comments

Comments

@stevengharris
Copy link
Owner

stevengharris commented Mar 13, 2023

The MarkupEditor does not treat <code> as a block element, since it's not one. It does, however, have markup.css set up to format code inside of <p> and other "style" block elements differently than when <code> is inside of a <blockquote>, which is a block element itself. For <p> and the other "style" elements, it <code> uses css "display: inline", while outside of the "style" elements (e.g., in <blockquote>) it uses css "display: block". This kind of works, but it means that in the MarkupEditor currently, the only time you can get code to display as a block is in an indented block, which is not what everyone (including me) wants. To fix this, I think <code> needs to be displayable inside of a <pre> block element. This in turn will require special handling for Enter and for multistyle operations.

An associated problem with <code> formatting is that it needs to be scrollable horizontally. This is fixable by including "overflow-x: scroll" in code's css. However, given the other problem above, the scrolling only works currently when code is in a blockquote, since the css uses "display: inline" inside of the styling elements.

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

No branches or pull requests

1 participant