{"repo":"antonmedv/codejar","free":true,"listed":false,"github":"https://github.com/antonmedv/codejar","clone":"git clone https://github.com/antonmedv/codejar.git","description":"An embeddable code editor for the browser 🍯","language":"TypeScript","stars":1972,"topics":["code-editor"],"license":"MIT","category":"dev-tools","readme_excerpt":"CodeJar – an embeddable code editor for the browser Features Lightweight ( 2.45 kB only) No dependencies Preserves indentation on a new line Adds closing brackets, quotes Indents line with the Tab key Supports undo / redo Getting Started Install CodeJar 🍯 &nbsp; via npm: Create an element and init the CodeJar 🍯: Second argument to CodeJar is a highlighting function (like Prism.js, highlight.js): Third argument to CodeJar is options: - tab: string replaces \"tabs\" with given string. Default: \\t . - Note: use css rule tab-size to customize size. - indentOn: RegExp allows auto indent rule to be customized. Default /[({\\[]$/ . - moveToNewLine: RegExp checks in extra newline character need to be added. Default /^[)}\\]]/ . - spellcheck: boolean enables spellchecking on the editor. Default false . - catchTab: boolean catches Tab keypress events and replaces it with tab string. Default: true . - preserveIdent: boolean keeps indent levels on new line. Default true . - addClosing: boolean automatically adds closing brackets, quotes. Default true . - history records history. Default true . - window window object. Default: window . - autoclose object - open string characters that triggers the autoclose function - close string characters that correspond to the opening ones and close the object. API updateCode(string) Updates the code. updateOptions(Partial ) Updates the options. onUpdate((code: string) = void) Calls callback on code updates. toString(): string Return current code. save()","default_branch":null,"files":null,"tree":[],"storefront":"/r/antonmedv","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/antonmedv/codejar/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}