component-playground icon indicating copy to clipboard operation
component-playground copied to clipboard

Add props to configure CodeMirror

Open janmyler opened this issue 8 years ago • 1 comments

Enable passing configuration options for CodeMirror via props from <Playground /> while keeping the original defaults.

Adds: lineNumbers, smartIndent, lineWrapping, tabSize.

janmyler avatar Jan 29 '17 14:01 janmyler

I was just about to make a PR for this. I wonder if it might be better to make it an object prop:

<Playground
   editor={{
    lineNumbers: true
  }}
/>

Intregrisist avatar Nov 10 '18 21:11 Intregrisist