Annotations
Code

Code

All the text formatted as code will be rendered using <code /> tag, anywhere in the document.

The element receives text and key as parameter and should return node type value.

ℹ️

Node Type Value is anything that can be rendered: numbers, strings, elements or an array.

Pre-Defined Syntax

	annotations: {
		code: (text, key) => (
			<code key={key}>
				{text}
			</code>
		),
	}