fix(client): wrap editor in span with "notranslate" (#38389)
* Update Editor.js * Fix linting issue * Working on Preview with .notranslate * Add "notranslate" for Preview component
This commit is contained in:
@ -220,6 +220,7 @@ class Editor extends Component {
|
|||||||
const editorTheme = theme === 'night' ? 'vs-dark-custom' : 'vs-custom';
|
const editorTheme = theme === 'night' ? 'vs-dark-custom' : 'vs-custom';
|
||||||
return (
|
return (
|
||||||
<Suspense fallback={<Loader timeout={600} />}>
|
<Suspense fallback={<Loader timeout={600} />}>
|
||||||
|
<span className='notranslate'>
|
||||||
<MonacoEditor
|
<MonacoEditor
|
||||||
editorDidMount={this.editorDidMount}
|
editorDidMount={this.editorDidMount}
|
||||||
editorWillMount={this.editorWillMount}
|
editorWillMount={this.editorWillMount}
|
||||||
@ -230,6 +231,7 @@ class Editor extends Component {
|
|||||||
theme={editorTheme}
|
theme={editorTheme}
|
||||||
value={contents}
|
value={contents}
|
||||||
/>
|
/>
|
||||||
|
</span>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ class Preview extends Component {
|
|||||||
render() {
|
render() {
|
||||||
const iframeToggle = this.state.iframeStatus ? 'disable' : 'enable';
|
const iframeToggle = this.state.iframeStatus ? 'disable' : 'enable';
|
||||||
return (
|
return (
|
||||||
<div className={`challenge-preview ${iframeToggle}-iframe`}>
|
<div className={`notranslate challenge-preview ${iframeToggle}-iframe`}>
|
||||||
<iframe
|
<iframe
|
||||||
className={'challenge-preview-frame'}
|
className={'challenge-preview-frame'}
|
||||||
id={mainId}
|
id={mainId}
|
||||||
|
Reference in New Issue
Block a user