/
rxeev
/
react-code-editor
Обзор
Документация
Войти
/
rxeev
/
react-code-editor
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/components/Editor/HtmlEditor.js
37 строк
907 B
unknown
full
13 сен 2022, 18:04
13 сен 2022, 18:04
27c0be7
Код
Авторство
О чём код?
import React from 'react' import AceEditor from "react-ace"; import "ace-builds/src-noconflict/mode-html"; import "ace-builds/src-noconflict/theme-monokai"; import "ace-builds/src-noconflict/snippets/html"; import "ace-builds/src-noconflict/ext-language_tools"; import { EditorContext } from '../../context'; export const Htmleditor = () => { const {html, setHtml} = React.useContext(EditorContext ) return ( <AceEditor placeholder='HTML .............................!' value={html} onChange = {value => setHtml(value)} mode='html' theme='monokai' name='editor_html' fontSize={20} height={'100%'} width={'100%'} showPrintMargin={false} showGutter={false} highlightActiveLine={true} setOptions ={{ enableBasicAutocompletion: true, enableLiveAutocompletion: true, enableSnippets: true, tabSize: 2, }} /> ) }