diff --git a/src/widget/edit-widget/edit-widget-html-content.js b/src/widget/edit-widget/edit-widget-html-content.js
index 6ad836b..07f89fb 100644
--- a/src/widget/edit-widget/edit-widget-html-content.js
+++ b/src/widget/edit-widget/edit-widget-html-content.js
@@ -22,28 +22,58 @@ class EditWidgetHTMLContent extends React.Component {
constructor(props) {
super(props);
- this.state = {
- widget: {}
- };
- }
+ let value = "";
+ let parts = props.controlId.split('.');
+ if (parts.length === 1) {
+ // not a customProperty
+ value=props.widget[props.controlId]
+ } else if(parts.length === 2){
+ // a custom property
+ value=props.widget[parts[0]][parts[1]]
+ } else {
+ value="controlID contains too many dots"
+ }
- handleKeyIgnore(event){
- // This function prevents a keystroke from beeing handled by dialog.js
- event.stopPropagation();
+ this.state = {
+ value: value
+ };
}
static getDerivedStateFromProps(props, state){
+
+ let value = "";
+ let parts = props.controlId.split('.');
+ if (parts.length === 1) {
+ // not a customProperty
+ value=props.widget[props.controlId]
+ } else if(parts.length === 2){
+ // a custom property
+ value=props.widget[parts[0]][parts[1]]
+ } else {
+ value="controlID contains too many dots"
+ }
+
return {
- widget: props.widget
- };
+ value: value
+ }
}
+ handleKeyIgnore(event){
+ // This function prevents a keystroke from beeing handled by dialog.js
+ event.stopPropagation();
+ }
+
+
render() {
- return
- HTML Content
- this.props.handleChange(e)} />
- ;
+ return (
+
+ HTML Content
+ this.props.handleChange(e)} />
+
+
+ );
}
}
+
export default EditWidgetHTMLContent;