Don't render hidden widgets in markdown visual editor (#1414)

This commit is contained in:
Robert Karlsson
2018-06-12 15:55:10 +02:00
committed by Shawn Erquhart
parent f365955478
commit d9488458a9
3 changed files with 12 additions and 2 deletions

View File

@ -66,6 +66,7 @@ class Shortcode extends React.Component {
onOpenMediaLibrary,
onRemoveInsertedMedia,
} = this.props;
if (field.get('widget') === 'hidden') return null;
const value = shortcodeData.get(field.get('name'));
const key = `field-${ field.get('name') }`;
const Control = getEditorControl();