import React from 'react'; import CharLimit from './decorators/CharLimit' import styled from 'styled-components' import FloatingLabel from './decorators/FloatingLabel' import Dropdown from 'react-dropdown'; import { LANGS, THEMES } from './renderers/Code'; const RelPositioning = styled.div` position: relative; height: calc(100% - 4em); ` const FlexChild = styled.div` display: block; margin-left: 2em; ` const TitleInput = (props) => { return ( ); } const PasteInput = (props) => { function handleKeyDown(e) { if (e.keyCode === 9) { // tab was pressed // prevent autofocus on next intput e.preventDefault(); // get selection start and end const start = e.target.selectionStart const end = e.target.selectionEnd props.insertTabCallback(start, end) // set cursor position to be at start e.target.selectionEnd = end + 4; } } return (