hide cursor

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

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

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

Loading…
Cancel
Save