In Rich Editor - What are code blocks and how do we use them?... Thank you

:-)

Best Answer

  • AnnPT77
    AnnPT77 Posts: 35,971 Member
    Answer ✓

    The MFP Community, under the covers, is really a piece of software called Vanilla Forums. There's a lot of info online about details of Vanilla Forums' rich text editor. This is what it says about code blocks:

    Code blocks

    The code block format option formats your text as code and includes syntax highlighting for some of the more common coding languages. When you input code, the coding language is automatically detected and the syntax is highlighted accordingly. Rich Editor currently supports:

    ADA

    Apache

    AppleScript

    C++

    Bash

    BASIC

    Clojure

    CMake

    CSS

    Dart

    Dockerfile

    Excel

    Go

    Haskell

    HTTP

    Java

    JavaScript

    JSON

    Kotlin

    Less

    Lua

    Makefile

    Markdown

    NGINX

    Objective-C

    Perl

    PHP

    PowerShell

    Python

    Ruby

    Rust

    SCSS

    SQL

    Swift

    Twig

    TypeScript

    XML

    YAML

    Source: https://success.vanillaforums.com/kb/articles/615-rich-editor

Answers

  • eastendgirl2025
    eastendgirl2025 Posts: 125 Member

    Thank you - so I could use it to insert an excel spreadsheet or table then I guess.

  • AnnPT77
    AnnPT77 Posts: 35,971 Member

    You can just paste in a table from any compatible rich text source. For example, here are a few cells that I copy-pasted from Excel, no code block involved:

    75%

    135

    80%

    144

    85%

    153

    If I put it in a code block it looks like this, just the formatted values:

    75%	135	
    80% 144
    85% 153

    I assume I can get Excel formulas to show up with some variation, but I don't need the feature, so I'll leave that to someone else who would be able to use it.