Format code directly inside XenForo code editors with a single click.
This add-on adds convenient formatting tools to XenForo's code editors, automatically applying the appropriate formatting rules for the language being edited.
Features:
One-Click Formatting: Add a Beautify code action to supported code editors, including the Insert code dialog.
Automatic Language Detection: Automatically select the appropriate formatter based on the active editor language.
JavaScript & JSON Support: Format JavaScript and JSON code.
CSS, Less & SCSS Support: Format CSS and related stylesheet languages.
HTML, XML & SVG Support: Format HTML, XML, SVG, and similar markup.
XenForo Template Support: Beautify XenForo template code directly in the editor.
Local Processing: Format code entirely in the browser without sending source code to external services.
Global Formatting Options: Configure indentation, tabs, preserved line breaks, trailing newlines, and line wrapping.
Keyboard Shortcut: Optionally format the active editor with Ctrl+Alt+F or Command+Option+F on macOS.
Selection Formatting: Optionally format only selected code while leaving the rest of the editor unchanged.
Error Feedback: Display clear errors for invalid JSON, mismatched JavaScript or CSS delimiters, malformed XML, and formatting failures.
Useful for:
Template Editing: Keep XenForo templates consistently formatted and easier to maintain.
Style Development: Clean up CSS, Less, and SCSS directly while editing styles.
JavaScript Development: Quickly format JavaScript and JSON.
Markup Editing: Keep HTML, XML, and SVG consistently structured.
ACP Development: Improve readability of code edited through XenForo's control panel.