{"repo":"andrewbaxter/malarkdowney","free":true,"listed":false,"github":"https://github.com/andrewbaxter/malarkdowney","clone":"git clone https://github.com/andrewbaxter/malarkdowney.git","description":"A next-generation What You See Is What You Wrote markdown editor","language":"Rust","stars":17,"topics":["markdown","markdown-editor"],"license":"ISC","category":"productivity","readme_excerpt":"This is a wasm/js markdown editor widget. What, why, interactive readme Features: - Intuitive - Space efficient - Nice looking and easily stylable - Just markdown - copy and paste work normally Rust usage Do cargo add malarkdowney - build(markdownText: &str) - Returns an Element , the editable markdown text block. - get text(element: &Element) - Returns the markdown text from the block. - set text(element: &Element, markdown text: &str) - Replaces the text in the block. Typescript usage TODO publish to npm. Currently you can build the npm package (wasm, package.json, typescript definitions and glue javascript) by: 1. cargo install wasm-pack (make sure it matches the version in wasm/Cargo.lock ) 2. In wasm/ do wasm-pack build 3. The package is generated in wasm/pkg The functions are the same as specified in rust usage, but camel case: - build(markdownText: string) - getText(element: Element) - setText(element: Element, markdownText: string) Caveats - Slack/github style markdown - Not all markdown elements are implemented currently - Markdown relies on blank lines to separate blocks, and will mean that e.g. abutting paragraphs with no blank lines inbetween will be combined into a single paragraph when rendered. Doing this however would be \"invisible control\" i.e. you'd press enter and see nothing change, once, and there could be invisible newlines anywhere. So this treats all new lines as hard block element splits. You can still add blank lines where they would be required for ","default_branch":null,"files":null,"tree":[],"storefront":"/r/andrewbaxter","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/andrewbaxter/malarkdowney/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."}