From 004ac6c90236a91ea10ba5e8c13cdfe0aa8d7d88 Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Thu, 23 Aug 2018 11:43:53 -0700 Subject: [PATCH] hide cursor --- components/Carbon.js | 4 +++- pages/embed.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/Carbon.js b/components/Carbon.js index e8c94a8..738c5b7 100644 --- a/components/Carbon.js +++ b/components/Carbon.js @@ -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) || diff --git a/pages/embed.js b/pages/embed.js index 40f548d..4c3b298 100644 --- a/pages/embed.js +++ b/pages/embed.js @@ -59,7 +59,7 @@ class Embed extends React.Component { return ( {this.state.mounted && ( - + {this.state.code} )}