0.6.3 • Published 3 years ago

react-code-editor-editable v0.6.3

Weekly downloads
12
License
MIT
Repository
github
Last release
3 years ago

React code editor

mockup

Functionalities

  • 191 languages highlighting with Highlight.js.
  • 97 themes/styles.
  • Scrollable.
  • Tab support.
  • Optional line numbers on editor.

Installation

npm i react-code-editor-editable or yarn add react-code-editor-editable

Usage

import React, { useState } from 'react'

import { CodeEditorEditable } from 'react-code-editor-editable'
import 'highlight.js/styles/dracula.css';

const App = () => {
  const [value, setValue] = useState('<div></div>')

  return (
    <div className='center'>
      <CodeEditorEditable
        value={value}
        setValue={setValue}
        width='50vw'
        height='50vh'
        language='html'
        inlineNumbers
      />
    </div>
  )
}

export default App

Props

NameTypeDescriptionRequired
valuestringString that contains the code written.✔️
setValueDispatch<SetStateAction>Function to that sets the the value field.✔️
widthstringCode editor width.
heightstringCode editor height.
paddingstringCode editor padding.
borderRadiusstringCode editor border radius.
languagestringSee here highlight.js all languages supported .✔️
inlineNumbersbooleanShows line numbers.
caretColorstringChanges the caret color.
tabSizenumberNumber of spaces added when Tab is pressed.

Styles

0.6.3

3 years ago

0.6.2

3 years ago

0.6.1

3 years ago

0.6.0-beta.0

3 years ago

0.6.0

3 years ago

0.5.3

3 years ago

0.5.6

3 years ago

0.5.5

3 years ago

0.5.0

3 years ago

0.5.1

3 years ago

0.1.2

3 years ago

0.1.3

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago