hide cursor

main
Mike Fix 6 years ago
parent 92a80429f3
commit 004ac6c902

@ -61,7 +61,9 @@ class Carbon extends React.PureComponent {
lineWrapping: true,
extraKeys: {
'Shift-Tab': 'indentLess'
}
},
// negative values removes the cursor, undefined means default (530)
cursorBlinkRate: this.props.readOnly ? -1 : undefined
}
const backgroundImage =
(this.props.config.backgroundImage && this.props.config.backgroundImageSelection) ||

@ -59,7 +59,7 @@ class Embed extends React.Component {
return (
<Page theme={this.state.theme}>
{this.state.mounted && (
<Carbon config={this.state} copyable={this.state.copyable}>
<Carbon readOnly={true} config={this.state} copyable={this.state.copyable}>
{this.state.code}
</Carbon>
)}

Loading…
Cancel
Save