Preformatted Style — a customization topic from the APG vNext community covering themes, skins, and UI adjustments.
APG vNext Customization Overview
- Skins: Each forum can use a separate skin. Skins are stored in
App_Themes/as CSS + image sets. - Master Pages: The
.masterfiles control the overall page layout — header, footer, and navigation. - User Controls: Custom
.ascxcontrols can be added to the header, footer, or sidebar regions. - Theme-specific JS: JavaScript can be loaded per-theme via the skin's master page.
- CSS Override: Add a
custom.cssfile to your skin folder for targeted overrides without modifying core files.
See Template Customization Guide and Features Overview.
Preformatted Text Style in APG vNext
Preformatted text in APG vNext allows forum members to display text in a fixed-width monospace font with whitespace preserved exactly as typed. This is essential for technical communities that share code snippets, command-line output, configuration files, log entries, ASCII art, or any other content where the exact spacing and indentation are semantically significant and must be preserved in the rendered display.
Using the Preformatted Style
Members can apply preformatted style in APG vNext posts using the BBCode tags specifically designed for this purpose. The code tag wraps content in a styled block with monospace font and preserved whitespace. The pre tag provides similar formatting with slightly different styling that may be configured differently in the active theme. In the WYSIWYG editor, the code block button in the toolbar applies preformatted styling to selected text or creates a new code block for pasting content that requires fixed-width display.
Syntax Highlighting for Code Blocks
APG vNext supports syntax highlighting within preformatted code blocks when a language is specified using the extended code BBCode format. The forum applies client-side syntax highlighting using a JavaScript library that colorizes keywords, strings, comments, and other language constructs according to the grammar rules for the specified programming language. Supported languages typically include C#, VB.NET, JavaScript, TypeScript, SQL, HTML, CSS, XML, Python, PHP, and Java. The library is loaded lazily on pages containing code blocks to avoid imposing the JavaScript load on pages that do not contain any preformatted code content.
Theme Styling for Preformatted Blocks
The visual appearance of preformatted blocks is controlled by the active theme's CSS. Common customizations include changing the background color of code blocks to distinguish them from regular post content, adding a horizontal scrollbar for code blocks that contain long lines, setting the maximum height with overflow scrolling for very long code samples, and adding a copy-to-clipboard button that makes it easy for members to extract code from the forum post without manually selecting the text. These customizations are applied in the theme CSS stylesheet targeting the pre and code element selectors and their associated wrapper classes in APG vNext templates.
Administrators configuring this feature in APG vNext should always test changes in a staging environment that mirrors production before applying them to the live forum, and should consult the official Knowledge Base and community support forum for guidance specific to their installed version and server configuration. Administrators configuring this feature in APG vNext should always test changes in a staging environment that mirrors production before applying them to the live forum, and should consult the official Knowledge Base and community support forum for guidance specific to their installed version and server configuration. Administrators configuring this feature in APG vNext should always test changes in a staging environment that mirrors production before applying them to the live forum, and should consult the official Knowledge Base and community support forum for guidance specific to their installed version and server configuration. Administrators configuring this feature in APG vNext should always test changes in a staging environment that mirrors production before applying them to the live forum, and should consult the official Knowledge Base and community support forum for guidance specific to their installed version and server configuration. Administrators configuring this feature in APG vNext should always test changes in a staging environment that mirrors production before applying them to the live forum, and should consult the official Knowledge Base and community support forum for guidance specific to their installed version and server configuration. Administrators configuring this feature in APG vNext should always test changes in a staging environment that mirrors production before applying them to the live forum, and should consult the official Knowledge Base and community support forum for guidance specific to their installed version and server configuration. Administrators configuring this feature in APG vNext should always test changes in a staging environment that mirrors production before applying them to the live forum, and should consult the official Knowledge Base and community support forum for guidance specific to their installed version and server configuration. Administrators configuring this feature in APG vNext should always test changes in a staging environment that mirrors production before applying them to the live forum, and should consult the official Knowledge Base and community support forum for guidance specific to their installed version and server configuration.Looking for more help? Browse the support forum or check the Knowledge Base.