Skip to main content

Code Block

A code block.


Name@idTypeDescriptionInherited from
textschema:textstringThe text of the code.Code
exportFromstencila:exportFromstringA compilation directive giving the name of the variable to export into the content of the code block.CodeBlock
formatschema:encodingFormatstringMedia type, typically expressed using a MIME format, of the code. See note 1.Code
idschema:idstringThe identifier for this item.Entity
importTostencila:importTostringA compilation directive giving the name of the variable to import the content of the code block as.CodeBlock
metastencila:metaobjectMetadata associated with this item.Entity
programmingLanguageschema:programmingLanguagestringThe programming language of the code.Code


  1. format : !array('This property allows the differentiation of formats using the same programming language or variants of a programming language. An example is using ')programmingLanguage!array(' "json" and ')encodingFormat!array(' "application/ld+json" for JSON-LD code examples.')


Available as#


This documentation was generated from CodeBlock.schema.yaml.