WordPress.org

Ready to get started?Download WordPress

Forums

Where / How to add [code][/code] to posts? (3 posts)

  1. maev
    Member
    Posted 5 years ago #

    Hey

    I'm looking for a CODE feature the same as the ones found on Forums,

    Where it will add a box around the words for the code and maybe have a select all button.

    I searched through plugins and couldn't really find anything resembling it.

    Any help is appreciated

    Thanks.

    (hope i posted in the right section)

  2. MichaelH
    Member
    Posted 5 years ago #

    What about the "code" button that is available in the HTML editor (HTML tab when writing a post)?

  3. adamh
    Member
    Posted 5 years ago #

    Hi Maev

    I wrote a plugin for showing code, although the code needs to be in an external file or url - it's called External Files.

    If your code snippets are saved as a file or url, you can wrap that file or url in [external] shortcode in the editor and the file will be imported and highlighted automatically.

    Extra parameters allow you to specify which lines to import and override the syntax highlighting format.

    It's available at http://wordpress.org/extend/plugins/external-files

    I'd really appreciate any feedback - I'll try and update the plugin with any suggestions you have.

    Thanks, Adam

Topic Closed

This topic has been closed to new replies.

About this Topic