Skip to content

added LaTeX in toolbar#13

Closed
tenTilMidnight wants to merge 2 commits intomainfrom
latex
Closed

added LaTeX in toolbar#13
tenTilMidnight wants to merge 2 commits intomainfrom
latex

Conversation

@tenTilMidnight
Copy link

@tenTilMidnight tenTilMidnight commented Feb 11, 2026

Context

The composer toolbar currently only supports standard Markdown formatting. As the first step toward LaTeX math support, users need a way to access a LaTeX editor from the composer. This PR adds the button that will eventually open a split-pane LaTeX editor modal (input on the left, preview on the right). Related issue: #9

Description

Added a "LaTeX" button to the composer formatting bar, positioned after the file upload buttons. The button is styled with a serif font to visually represent the LaTeX brand. On click, it fires an action:composer.latex-editor.open hook that will be connected to the editor modal in a follow-up PR.

Changes are made to node_modules plugins and persisted using patch-package:

Changes

patches/nodebb-plugin-composer-default+10.3.1.patch
Modifies static/templates/partials/composer-formatting.tpl to add a

  • with a data-format="latex" button after the upload buttons, using the same btn btn-sm btn-link text-reset classes as existing toolbar buttons
    patches/nodebb-plugin-markdown+13.2.3.patch
    Modifies public/js/markdown.js to register a latex entry in the formatting dispatch table via formatting.addButtonDispatch(), following the same pattern as bold, italic, and other handlers
    Modifies public/scss/default.scss to add .formatting-bar .latex-logo CSS styling with a serif font stack

    Note: since package.json is gitignored, after pulling this branch and running npm install you might need to apply the patches manually by npx patch-package.

  • 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

    Successfully merging this pull request may close these issues.

    1 participant

    Comments