|
|
@ -78,16 +78,23 @@ class Embed extends React.Component {
|
|
|
|
// Used by embed provider
|
|
|
|
// Used by embed provider
|
|
|
|
src: window.location.toString(),
|
|
|
|
src: window.location.toString(),
|
|
|
|
context: 'iframe.resize',
|
|
|
|
context: 'iframe.resize',
|
|
|
|
height: this.ref.current.exportContainerNode.offsetHeight,
|
|
|
|
height: this.ref.current.exportContainerNode.offsetHeight
|
|
|
|
// Carbon specific data
|
|
|
|
|
|
|
|
id: this.state.id ? `carbon:${this.state.id}` : 'carbon',
|
|
|
|
|
|
|
|
code: this.state.code
|
|
|
|
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
'*'
|
|
|
|
'*'
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
updateCode = code => this.setState({ code }, this.postMessage)
|
|
|
|
updateCode = code => {
|
|
|
|
|
|
|
|
this.setState({ code }, this.postMessage)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getParent(window).postMessage(
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
id: this.state.id ? `carbon:${this.state.id}` : 'carbon',
|
|
|
|
|
|
|
|
code
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
'*'
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|