UNPKG

@mikezimm/fps-library-v2

Version:

Library of reusable typescript/javascript functions, interfaces and constants

38 lines (37 loc) 1.36 kB
import * as React from "react"; export interface IMonacoEditorProps { jsonString: any; wrapText: boolean; readOnly: boolean; onChange: (newValue: string) => void; } /** * Special thanks to the person who created this simple implimentation! * https://github.com/ynot3363/monaco-editor/blob/main/MonacoEditor.tsx * * For some reason, this may not be able to be loaded directly from this package. * However, you can copy the folder to your project, install the dependancy and use this import: * * This MAY not be required since it's in fps-library-v2 1. npm install @monaco-editor/loader@^1.3.1; NOTE: I tried ^1.4.1 and it did not work. * 2. import MonacoEditor from '../MonacoYnot/MonacoEditor'; 2. import MonacoEditor from "@mikezimm/fps-library-v2/lib/components/atoms/MonacoYnot/MonacoEditor"; * 3. Usage: <MonacoEditor jsonString={codeLines.join('\n')} wrapText={ true } readOnly={ true } onChange={ null } // language="typescript" // onValueChange={onValueChange} // theme="vs-dark" // showLineNumbers={true} // showMiniMap={true} /> * */ declare const MonacoEditor: React.FC<IMonacoEditorProps>; export default MonacoEditor; //# sourceMappingURL=MonacoEditor.d.ts.map