Skip to content

Treatment of <code> blocks #96

@stevengharris

Description

@stevengharris

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions