Render custom html content as a html in Sandbox

[MAILPOET-2462]
This commit is contained in:
Rostislav Wolny
2019-12-11 14:43:44 +01:00
committed by Pavel Dohnal
parent 906307a2c7
commit ece2b2ab55

View File

@@ -4,6 +4,7 @@ import {
PanelBody, PanelBody,
TextareaControl, TextareaControl,
ToggleControl, ToggleControl,
SandBox
} from '@wordpress/components'; } from '@wordpress/components';
import { InspectorControls } from '@wordpress/block-editor'; import { InspectorControls } from '@wordpress/block-editor';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
@@ -35,7 +36,7 @@ const CustomHtmlEdit = ({ attributes, setAttributes }) => {
<> <>
{inspectorControls} {inspectorControls}
<div> <div>
{attributes.content} <SandBox html={attributes.content} key={attributes.content} />
</div> </div>
</> </>
); );