--- a/client/src/HtmlSerializer.js Wed Jun 07 18:18:44 2017 +0200
+++ b/client/src/HtmlSerializer.js Thu Jun 08 11:13:41 2017 +0200
@@ -13,12 +13,6 @@
annotation: 'span'
}
-const annotationStyle = {
- textDecoration: 'underline',
- textDecorationStyle: 'dotted',
- backgroundColor: 'yellow'
-}
-
const rules = [
// Block rules
{
@@ -57,7 +51,7 @@
case 'bold': return <strong>{children}</strong>
case 'italic': return <em>{children}</em>
case 'underline': return <u>{children}</u>
- case 'annotation': return <span style={annotationStyle}>{children}</span>
+ case 'annotation': return <span style={{ backgroundColor: object.data.get('color') }}>{children}</span>
default: return;
}
}