summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-10-13 15:22:52 +0200
committerSamy Pesse <samypesse@gmail.com>2016-10-13 15:22:52 +0200
commitf1f2024489eb21204c814a778d464e75c1eb1941 (patch)
tree9a04742ed00400ee634784bcea32e68ce424870b
parent227b329e78a761ba3fc75c7b79048b0d387f9944 (diff)
downloadgitbook-f1f2024489eb21204c814a778d464e75c1eb1941.zip
gitbook-f1f2024489eb21204c814a778d464e75c1eb1941.tar.gz
gitbook-f1f2024489eb21204c814a778d464e75c1eb1941.tar.bz2
Add support for align HTML attribute
-rw-r--r--packages/gitbook-core/src/components/HTMLContent.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/gitbook-core/src/components/HTMLContent.js b/packages/gitbook-core/src/components/HTMLContent.js
index 720e50a..75da884 100644
--- a/packages/gitbook-core/src/components/HTMLContent.js
+++ b/packages/gitbook-core/src/components/HTMLContent.js
@@ -5,6 +5,16 @@ const entities = require('entities');
const { InjectedComponent } = require('./InjectedComponent');
+const DOMProperty = require('react/lib/ReactInjection').DOMProperty;
+DOMProperty.injectDOMPropertyConfig({
+ Properties: {
+ align: DOMProperty.MUST_USE_ATTRIBUTE
+ },
+ isCustomAttribute: (attributeName) => {
+ return attributeName === 'align';
+ }
+});
+
/*
HTMLContent is a container for the page HTML that parse the content and
render the right block.