slate-serializers
View project on npmView project on GitHub

Convert Slate JSON with slateToTemplate

Change configuration

Default

Edit Slate content

slateToTemplate

Demo

Try changing the contents of this editor. The rest of the page updates as you make changes to demonstrate:

  • the Slate JSON value;
  • content rendered using the slateToTemplate.

slateToTemplate output

slateToTemplate

Demo

Try changing the contents of this editor. The rest of the page updates as you make changes to demonstrate:

  • the Slate JSON value;
  • content rendered using the slateToTemplate.

Slate value

{
	type: 'h2',
	children: [
		{
			text: 'slateToTemplate'
		}
	]
}
{
	type: 'h3',
	children: [
		{
			text: 'Demo'
		}
	]
}
{
	type: 'p',
	children: [
		{
			text: 'Try changing the contents of this editor. The rest of the page updates as you make changes to demonstrate:'
		}
	]
}
{
	type: 'ul',
	children: [
		{
			type: 'li',
			children: [
				{
					text: 'the Slate JSON value;'
				}
			]
		},
		{
			type: 'li',
			children: [
				{
					text: 'content rendered using the '
				},
				{
					text: 'slateToTemplate',
					code: true
				},
				{
					text: '.'
				}
			]
		}
	]
}