-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Notebooks] Support Markdown in Notebook Entries #6060
Comments
Note that users have requested support for tables, so we should ensure that whatever library we use supports tables. |
@jvigliotta Snarkdown looks cool/clean, but they unfortunately don't support tables (yet?). So maybe something like Marked instead? They appear to support tables (a la Github) |
@scottbell Yeah I think we were looking at Snarkdown because of the size and functionality needs at the time, if you think Marked is a better choice then I'm on board! |
Tables! Screen.Recording.2023-09-25.at.4.01.24.PM.movIt looks like we ignore |
To test, use this markdown sample file: and ensure it renders properly. Try to add new some new elements too like tables, text, and whitelisted and non-whitelisted links. |
* try marked out * fix url validation * now rendering blockquotes properly * add abbrv, link titles, and strikethrough * fix tests and lint * Closes #6060 - CSS resets and styling for markdown-related HTML markup in Notebook entries. - Better styling and cursor affordances for Notebook entry selection and editing interaction flow. * add line breaks option * Closes #6060 - Tab * Closes #6060 - Conversion of contenteditable-div to textarea started. - Stubbed in textarea with styles. * have it markdown with a textarea and adjust size automatically * Closes #6060 - Padding added back to text `div` area. * Closes #6060 - Styles added to support Shift Log and hover behavior for entries on locked pages. - Removed `--major` styling from Shift Log Commit Entries button to reduce confusion with entry commit button. - CSS code cleanups. * two step focus/edit. also scroll into view for editing * add markdown, strip all tags, and truncate * lint * remove unneeded code * fix notebook entry, selected page may also be null * fix existing notebook tests * lint * fix whitelist * readd whitelist * lint * fix link tests * fix tests * fix tagging test * add some markdown test * get rid of pause * add another sanitization step --------- Co-authored-by: Charles Hacskaylo <charlesh88@gmail.com> Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
Testing Notes
|
Verified in Testathon 10/5/23 Great job! This rocks. |
Verified in Testathon on 10/05/2023 |
Verified Testathon 10/5/2023 |
How do I quote lines?
|
@charlesh88 right! From the marked demo:
|
Lol, that was a test... Turns out I think sanitizing Notebook entries has broken block quotes, as |
Verified fixed Testathon 2023-10-05. There are a few issues and I'll file a followup issue for future fixes. |
Agreed, that makes sense. Dang angle brackets |
Is your feature request related to a problem? Please describe.
Robust formatting in Notebook entries. Using Markdown: https://www.npmjs.com/package/snarkdown is a lightweight viable option.
Describe the solution you'd like
When editing a notebook entry, if you were to use MarkDown, when viewing the notebook entry, it would be formatted accordingly using HTML.
Additional context
First version is #6059
The text was updated successfully, but these errors were encountered: