Function: InsertCodeBlock()

InsertCodeBlock(props): ReactNode | Promise<ReactNode>

A toolbar button that allows the user to insert a fenced code block. Once the code block is focused, you can construct a special code block toolbar for it, using the ConditionalContents primitive. See the ConditionalContents documentation for an example.

Parameters

ParameterType
propsobject

Returns

ReactNode | Promise<ReactNode>