Skip to content

coffee2code/preserve-code-formatting

Repository files navigation

Preserve Code Formatting

A plugin for WordPress that preserves formatting of code for display by preventing its modification by WordPress and other plugins while also retaining whitespace.

This plugin is available in the WordPress Plugin Directory: https://wordpress.org/plugins/preserve-code-formatting/

Installation

  1. Install via the built-in WordPress plugin installer. Or install the plugin code inside the plugins directory for your site (typically /wp-content/plugins/).
  2. Activate the plugin through the 'Plugins' admin menu in WordPress
  3. Go to the 'Settings' -> 'Code Formatting' admin settings page (which you can also get to via the Settings link next to the plugin on the Manage Plugins page) and customize the settings.
  4. Write a post with code contained within opening and closing code tags. If you are using the block editor (aka Gutenberg), then this plugin is only useful for maintaining code formatting for posts written before WP 5.0 (or whenever you started creating posts with the block editor). You should be using the built-in code block when including code into the block editor. Otherwise, if you are actively using the classic editor, be sure to use the HTML (aka "Text") editor and not the "Visual" editor or you'll encounter formatting issues.

Additional Documentation

See readme.txt for additional usage information. See CHANGELOG.md for the list of changes for each release.

Support

Commercial support and custom development are not presently available. You can raise an issue on GitHub or post in the plugin's support forum on WordPress.org.

If the plugin has been of benefit to you, how about submitting a review for it in the WordPress Plugin Directory or considerating a donation?

License

This plugin is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

About

A plugin for WordPress that preserves formatting of code for display by preventing its modification by WordPress and other plugins while also retaining whitespace.

Resources

License

Stars

Watchers

Forks

Packages

No packages published