• Resolved rgfactory

    (@rgfactory)


    Hi Thomas,

    it’s me again.

    When I add an additional CSS class to a Katex block from the admin menu, it breaks the block rendering on the post editor page.
    Moreover, the css class is not added in the html code.

    I use WordPress 5.2.1 and the last version of your plugin.

    Thanks in advance.

    See you !

    PS: I hope this time I have found a real bug…:p

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Thomas Churchman

    (@beskhue)

    Hi rgfactory,

    Thanks for the report. I can confirm the class is erroneously removed when the formula is rendered in posts.

    I also see the class is added in the editor; but it is added around the entire block in the editor and not just around the rendered formula. This probably causes the breakage you’re experiencing. It makes more sense to add the class only to the rendered formula, in the same way it would show in posts.

    I’ll find some time to fix this.

    Plugin Author Thomas Churchman

    (@beskhue)

    I am testing a new version of the plugin which adds the support for CSS classes you’re looking for. I would be grateful if you could test this version on your site and report back, before this version is pushed to other users. Based on my tests, I think it should be good to go as is.

    You can download it at the bottom of the page here, be sure to select “Development Version”:

    https://www.ads-software.com/plugins/katex/advanced/

    Note the compatibility notice in the changelog:

    Support adding CSS classes to KaTeX Gutenberg Blocks to help with styling. Backwards compatibility note: KaTeX Gutenberg Blocks are now rendered wrapped in a div element on which classes wp-block-katex-display-block and katex-eq are set. You can add more classes to this div through WordPress’s post editor. Previously, KaTeX Gutenberg Blocks were rendered wrapped in an unclassed span. KaTeX shortcodes are still wrapped inside a span with only the class katex-eq set. If you depend on old behavior for styling, you might need to update your styling rules.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Additional CSS class’ is closed to new replies.