const React = require('react');
const ReactSafeHtml = require('react-safe-html');
const { DOMProperty } = require('react-dom/lib/ReactInjection');
const htmlTags = require('html-tags');
const entities = require('entities');
const { InjectedComponent } = require('./InjectedComponent');
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.
All html elements can be extended using the injected component.
*/
function inject(injectedProps, Component) {
return (props) => {
const cleanProps = {
...props,
className: props['class']
};
delete cleanProps['class'];
return (