* Added regexes to replace name and time extras
* Added [color=#abc] replacements inside of blockquotes
This works with the following "algorithm":
1. Transform any [color=]-Tags with a valid css color into a codimd-quote-options element.
2. While transforming blockquotes, check if one of their paragraphs contains a codimd-quote-options element. If multiple are found, only the first one will be used.
3. Remove the codimd-quote-options element and set the border-left-color of the blockquote appropriately.
* Added correct CSS styling of blockquote extras
* Added tag icon when [color=...] is used outside a blockquote
In version 1.6 of CodiMD the [color=...] tag renders a tag-icon in the specified color when used outside of a blockquote paragraph.
* Added changelog entry
* Flip if-else in quote-options for better readability
* Flip another if-else in quote-options for better readability
* Extract language codes into object
* Restructure language search so it would find more specific language codes first.
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
* Added TOC support and anchors for headings
* Moved @types/markdown-it-anchor from devDependencies to dependencies
* Add subnode renderer
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
* Added node-replacer for toc generation
ul lists may not be nested inside a p element. Therefore replaces this replacer every p that has a div.table-of-contents inside of it with the div directly.
* Add index to replacer function
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
* Add TOC to example code
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
* Remove unused import
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
* Removed unnecessary div wrapper of toc
* Fixed toc-renderer
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
this makes it possible to use abbreviations like these
```
*[HTML]: Hyper Text Markup Language
*[W3C]: World Wide Web Consortium
The HTML specification
is maintained by the W3C.
```
Co-authored-by: Philip Molares <philip@mauricedoepke.de>
this makes it possible to use definition lists like
```
Term 1
: Definition 1
with lazy continuation.
Term 2 with *inline markup*
: Definition 2
{ some code, part of Definition 2 }
Third paragraph of definition 2.
_Compact style:_
Term 1
~ Definition 1
Term 2
~ Definition 2a
~ Definition 2b
```
Co-authored-by: Philip Molares <philip@mauricedoepke.de>
* Add basic markdown it rendering
* Add markdown preview
* Add embedings for vimeo, youtube, gist
* Add support for legacy shortcodes and link detection
* Set "both" as editor default
* Add markdown-it-task-lists
* Add twemoji
* Changed SlideShare short-code behaviour from embedding to generating a link
* Extract markdown it parser debugger into separate component
* Deactivate markdown it linkify for now
* Add link safety attributes
* Add one-click-embedding component and use it
* Added embedding changes and deprecations to CHANGELOG.md
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Philip Molares <philip@mauricedoepke.de>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
started a changelog for this project
it follows the proposed format from https://keepachangelog.com/en/1.0.0/
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Co-authored-by: Sheogorath <sheogorath@shivering-isles.com>
* added info-banner component to show the banner.text, we got from the backend config. This banner is shown on top of the landing page (intro, history, login/signup and profile) and also on top of the editor and links to `/n/banner`
* added banner to backendConfig Redux state
* added BannerState to the ApplicationState with that the showing of the banner is globally controlled, the banner text is given to the banner component and the timestamp to acknowledge a banner was read by the user
* the timestamp of a dismissed note is saved in the browsers localStorage to determine in the future if the banner should be shown
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
* Added Link objects around history-cards and the title in table-view
This commit adds one Link element wrapping the title of a note in the table view and one Link element wrapping the whole card of a note in cards view.
This behaviour currently doesn't work completely correct as other buttons on the card become unclickable and needs to be fixed in another commit before merging this branch.
* Fixed Link behaviour for card view
The cards aren't wrapped inside a Link element anymore but the middle column of a card (where the title and tags are located) is now wrapped inside the Link element.
With this approach not the whole card is clickable anymore, but it's enough clickable space anyway. The positive aspect is that we don't have to deal with "position: absolute"-elements that may break responsiveness.