diff -r dab2a16500e0 -r f1b125b95fe9 client/src/HtmlSerializer.js --- a/client/src/HtmlSerializer.js Thu Jun 01 19:01:03 2017 +0200 +++ b/client/src/HtmlSerializer.js Tue Jun 06 15:56:41 2017 +0200 @@ -2,9 +2,7 @@ import { Html } from 'slate' const BLOCK_TAGS = { - blockquote: 'quote', p: 'paragraph', - pre: 'code' } // Add a dictionary of mark tags. @@ -12,6 +10,13 @@ em: 'italic', strong: 'bold', u: 'underline', + annotation: 'span' +} + +const annotationStyle = { + textDecoration: 'underline', + textDecorationStyle: 'dotted', + backgroundColor: 'yellow' } const rules = [ @@ -27,12 +32,11 @@ } }, serialize(object, children) { - if (object.kind != 'block') return + if (object.kind !== 'block') return switch (object.type) { - case 'code': return
{children}
case 'paragraph': case 'line': return

{children}

- case 'quote': return
{children}
+ default: return; } } }, @@ -48,11 +52,13 @@ } }, serialize(object, children) { - if (object.kind != 'mark') return + if (object.kind !== 'mark') return switch (object.type) { case 'bold': return {children} case 'italic': return {children} case 'underline': return {children} + case 'annotation': return {children} + default: return; } } }