made some components wider in View Mode
These objects include
- `<img>` alone in a paragraph
- `<codimd-youtube>`
- `<codimd-vimeo>`
- `<codimd-pdf>`
This can be toggled via the `wider` prop in `MarkdownRenderer`
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
* Added possibility to add a text below the icon on the preview
* Changes naming of i18nKey argument
* Rebase fixes
* Show preview image only if defined
added image-replacer
this component replaces all `<img>`'s in the markdown-it output with an ImageFrame component. This enables us to implement image proxies and other per image customization in the future.
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
* Add activation callback to one-click-embedding
* use activation callback to change size of pdf
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
* 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>