Skip to content

Instantly share code, notes, and snippets.

@myobie
Created July 9, 2018 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myobie/ef10007d8c886a1d3152ba56f99d8036 to your computer and use it in GitHub Desktop.
Save myobie/ef10007d8c886a1d3152ba56f99d8036 to your computer and use it in GitHub Desktop.
export const document = [
newBlock([
newPart('Hello world '),
newPart('**', { type: 'control', controlType: 'bold', styles: ['bold'] }),
newPart('hooray for ', { styles: ['bold', 'italic'] }),
newPart('_', { type: 'control', controlType: 'italic', styles: ['bold', 'italic'] }),
newPart('nested italic', { styles: ['bold', 'italic'] }),
newPart('_', { type: 'control', controlType: 'italic', styles: ['bold', 'italic'] }),
newPart(' text', { styles: ['bold'] }),
newPart('**', { type: 'control', controlType: 'bold', styles: ['bold'] }),
newPart(' foo * bar')
]),
newEmptyBlock(),
newBlock([
newPart(' Nathan Herald')
], { style: ['code'] }),
newEmptyBlock(),
newBlock([
newPart('_', { type: 'control', controlType: 'italic', styles: ['italic'] }),
newPart('[', { type: 'control', controlType: 'linkFull', styles: ['link', 'italic'] }),
newPart('Email me', { styles: ['link', 'italic'] }),
newPart('](', { type: 'control', controlType: 'linkFull', styles: ['link', 'italic'] }),
newPart('mailto:me@nathanherald.com', { styles: ['link', 'italic'] }),
newPart(')', { type: 'control', controlType: 'linkFull', styles: ['link', 'italic'] }),
newPart('_', { type: 'control', controlType: 'italic', styles: ['italic'] })
])
]

Hello world hooray for nested italic text foo * bar

Nathan Herald

Email me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment