Forums Help and Tips How-to How to embed code

Tagged: 

  • This topic has 2 replies, 1 voice, and was last updated 30 August, 2020 by admin.
  • Creator
    Topic
  • #131
    admin
    Keymaster
    @admin

    There are two ways:
    1- [code lang="lang"] … code … [/code]
    2- [run-code lang="lang"] … code … [/run-code]

    The first way is powered by Ace editor providing syntax highlighting for over 110 languages.
    Example:

    [code lang="python"]print("Hello World!");[/code]

    The second way is powered by AOC project providing online editor for c, c++, java and python.
    Example:

    [run-code lang="python"]print("Hello World!");[/run-code]

    Limitation: for stability reasons, the max numbers of characters you can use in a single embed is maxed at 211

Viewing 1 reply thread
  • Author
    Replies
    • #138
      admin
      Keymaster
      @admin

      Supported short-codes:
      Type 1:

      • [code lang="abap"] … [/code]
      • [code lang="abc"] … [/code]
      • [code lang="actionscript"] … [/code]
      • [code lang="ada"] … [/code]
      • [code lang="alda"] … [/code]
      • [code lang="apache conf"] … [/code]
      • [code lang="apex"] … [/code]
      • [code lang="aql"] … [/code]
      • [code lang="asciidoc"] … [/code]
      • [code lang="asl"] … [/code]
      • [code lang="assembly x86"] … [/code]
      • [code lang="autohotkey"] … [/code]
      • [code lang="batchfile"] … [/code]
      • [code lang="c and c++"] … [/code]
      • [code lang="c#"] … [/code]
      • [code lang="c9search"] … [/code]
      • [code lang="cirru"] … [/code]
      • [code lang="clojure"] … [/code]
      • [code lang="cobol"] … [/code]
      • [code lang="coffeescript"] … [/code]
      • [code lang="coldfusion"] … [/code]
      • [code lang="crystal"] … [/code]
      • [code lang="csound document"] … [/code]
      • [code lang="csound score"] … [/code]
      • [code lang="csound"] … [/code]
      • [code lang="css"] … [/code]
      • [code lang="curly"] … [/code]
      • [code lang="d"] … [/code]
      • [code lang="dart"] … [/code]
      • [code lang="diff"] … [/code]
      • [code lang="django"] … [/code]
      • [code lang="dockerfile"] … [/code]
      • [code lang="dot"] … [/code]
      • [code lang="drools"] … [/code]
      • [code lang="edifact"] … [/code]
      • [code lang="eiffel"] … [/code]
      • [code lang="ejs"] … [/code]
      • [code lang="elixir"] … [/code]
      • [code lang="elm"] … [/code]
      • [code lang="erlang"] … [/code]
      • [code lang="forth"] … [/code]
      • [code lang="fortran"] … [/code]
      • [code lang="freemarker"] … [/code]
      • [code lang="fsharp"] … [/code]
      • [code lang="fsl"] … [/code]
      • [code lang="gcode"] … [/code]
      • [code lang="gherkin"] … [/code]
      • [code lang="gitignore"] … [/code]
      • [code lang="glsl"] … [/code]
      • [code lang="go"] … [/code]
      • [code lang="gobstones"] … [/code]
      • [code lang="graphqlschema"] … [/code]
      • [code lang="groovy"] … [/code]
      • [code lang="haml"] … [/code]
      • [code lang="handlebars"] … [/code]
      • [code lang="haskell cabal"] … [/code]
      • [code lang="haskell"] … [/code]
      • [code lang="haxe"] … [/code]
      • [code lang="hjson"] … [/code]
      • [code lang="html (elixir)"] … [/code]
      • [code lang="html (ruby)"] … [/code]
      • [code lang="html"] … [/code]
      • [code lang="ini"] … [/code]
      • [code lang="io"] … [/code]
      • [code lang="jack"] … [/code]
      • [code lang="jade"] … [/code]
      • [code lang="java"] … [/code]
      • [code lang="javascript"] … [/code]
      • [code lang="json"] … [/code]
      • [code lang="json5"] … [/code]
      • [code lang="jsoniq"] … [/code]
      • [code lang="jsp"] … [/code]
      • [code lang="jssm"] … [/code]
      • [code lang="jsx"] … [/code]
      • [code lang="julia"] … [/code]
      • [code lang="kotlin"] … [/code]
      • [code lang="latex"] … [/code]
      • [code lang="less"] … [/code]
      • [code lang="liquid"] … [/code]
      • [code lang="lisp"] … [/code]
      • [code lang="livescript"] … [/code]
      • [code lang="logiql"] … [/code]
      • [code lang="lsl"] … [/code]
      • [code lang="lua"] … [/code]
      • [code lang="luapage"] … [/code]
      • [code lang="lucene"] … [/code]
      • [code lang="makefile"] … [/code]
      • [code lang="markdown"] … [/code]
      • [code lang="mask"] … [/code]
      • [code lang="matlab"] … [/code]
      • [code lang="maze"] … [/code]
      • [code lang="mediawiki"] … [/code]
      • [code lang="mel"] … [/code]
      • [code lang="mixal"] … [/code]
      • [code lang="mushcode"] … [/code]
      • [code lang="mysql"] … [/code]
      • [code lang="nginx"] … [/code]
      • [code lang="nim"] … [/code]
      • [code lang="nix"] … [/code]
      • [code lang="nsis"] … [/code]
      • [code lang="nunjucks"] … [/code]
      • [code lang="objective-c"] … [/code]
      • [code lang="ocaml"] … [/code]
      • [code lang="pascal"] … [/code]
      • [code lang="perl 6"] … [/code]
      • [code lang="perl"] … [/code]
      • [code lang="pgsql"] … [/code]
      • [code lang="php (blade template)"] … [/code]
      • [code lang="php"] … [/code]
      • [code lang="pig"] … [/code]
      • [code lang="powershell"] … [/code]
      • [code lang="praat"] … [/code]
      • [code lang="prisma"] … [/code]
      • [code lang="prolog"] … [/code]
      • [code lang="properties"] … [/code]
      • [code lang="protobuf"] … [/code]
      • [code lang="puppet"] … [/code]
      • [code lang="python"] … [/code]
      • [code lang="qml"] … [/code]
      • [code lang="r"] … [/code]
      • [code lang="razor"] … [/code]
      • [code lang="rdoc"] … [/code]
      • [code lang="red"] … [/code]
      • [code lang="rhtml"] … [/code]
      • [code lang="rst"] … [/code]
      • [code lang="ruby"] … [/code]
      • [code lang="rust"] … [/code]
      • [code lang="sass"] … [/code]
      • [code lang="scad"] … [/code]
      • [code lang="scala"] … [/code]
      • [code lang="scheme"] … [/code]
      • [code lang="scss"] … [/code]
      • [code lang="sh"] … [/code]
      • [code lang="sjs"] … [/code]
      • [code lang="slim"] … [/code]
      • [code lang="smarty"] … [/code]
      • [code lang="snippets"] … [/code]
      • [code lang="soy template"] … [/code]
      • [code lang="space"] … [/code]
      • [code lang="sql"] … [/code]
      • [code lang="sqlserver"] … [/code]
      • [code lang="stylus"] … [/code]
      • [code lang="svg"] … [/code]
      • [code lang="swift"] … [/code]
      • [code lang="tcl"] … [/code]
      • [code lang="terraform"] … [/code]
      • [code lang="tex"] … [/code]
      • [code lang="text"] … [/code]
      • [code lang="textile"] … [/code]
      • [code lang="toml"] … [/code]
      • [code lang="tsx"] … [/code]
      • [code lang="twig"] … [/code]
      • [code lang="typescript"] … [/code]
      • [code lang="vala"] … [/code]
      • [code lang="vbscript"] … [/code]
      • [code lang="velocity"] … [/code]
      • [code lang="verilog"] … [/code]
      • [code lang="vhdl"] … [/code]
      • [code lang="visualforce"] … [/code]
      • [code lang="wollok"] … [/code]
      • [code lang="xml"] … [/code]
      • [code lang="xquery"] … [/code]
      • [code lang="yaml"] … [/code]
      • [code lang="zeek"] … [/code]
    • #139
      admin
      Keymaster
      @admin

      Supported short-codes:
      Type 2:

      • [run-code lang="c"] … [/run-code]
      • [run-code lang="c++"] … [/run-code]
      • [run-code lang="java"] … [/run-code]
      • [run-code lang="python"] … [/run-code]
Viewing 1 reply thread
  • The forum ‘How-to’ is closed to new topics and replies.