@ -193,7 +193,7 @@ class MarkdownEditor extends Component {
|
||||
>
|
||||
<MaxWidth column auto>
|
||||
<Header onClick={this.focusAtStart} readOnly={readOnly} />
|
||||
<Contents state={this.editorState} />
|
||||
{readOnly && <Contents state={this.editorState} />}
|
||||
{!readOnly && (
|
||||
<Toolbar state={this.editorState} onChange={this.onChange} />
|
||||
)}
|
||||
|
@ -9,7 +9,7 @@ export default function Code({ children, node, readOnly, attributes }: Props) {
|
||||
const language = node.data.get('language') || 'javascript';
|
||||
|
||||
return (
|
||||
<Container {...attributes}>
|
||||
<Container {...attributes} spellCheck={false}>
|
||||
{readOnly && <CopyButton text={node.text} />}
|
||||
<Pre className={`language-${language}`}>
|
||||
<code className={`language-${language}`}>{children}</code>
|
||||
|
@ -39,8 +39,9 @@ const StyledCopyToClipboard = styled(CopyToClipboard)`
|
||||
z-index: 1;
|
||||
font-size: 12px;
|
||||
background: ${color.slateLight};
|
||||
border-radius: 2px;
|
||||
border-radius: 0 2px 0 2px;
|
||||
padding: 1px 6px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: ${color.slate};
|
||||
|
@ -2,7 +2,9 @@
|
||||
import styled from 'styled-components';
|
||||
import { color } from 'shared/styles/constants';
|
||||
|
||||
const InlineCode = styled.code`
|
||||
const InlineCode = styled.code.attrs({
|
||||
spellCheck: false,
|
||||
})`
|
||||
padding: 0.25em;
|
||||
background: ${color.smoke};
|
||||
border-radius: 4px;
|
||||
|
@ -78,6 +78,18 @@ class Layout extends React.Component {
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0"
|
||||
/>
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
type="image/png"
|
||||
href="/favicon-16.png"
|
||||
sizes="16x16"
|
||||
/>
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
type="image/png"
|
||||
href="/favicon-32.png"
|
||||
sizes="32x32"
|
||||
/>
|
||||
</Helmet>
|
||||
<Analytics />
|
||||
|
||||
|
Reference in New Issue
Block a user