Commit graph

7 commits

Author SHA1 Message Date
Jakob Klepp
fe2f7403aa
Add plantuml support (#327)
* Add plantuml support
* Enable PlantUML rendering only if plantumlServer config is set
* Show warning box when plantuml is enabled but no server is configured
2020-08-04 11:15:23 +02:00
mrdrogdrog
50b04c8403
Add toc sidebar+dropdown (#272)
* Replace markdown-it-table-of-contents with markdown-it-toc-done-right

Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Co-authored-by: Philip Molares <philip.molares@udo.edu>

Extract render window code

Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Co-authored-by: Philip Molares <philip.molares@udo.edu>

add new package

fix stickyness

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

show toc sidebar only if there is enough space

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* add min height class

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Move markdown toc into own component

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* add sidebar buttons

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Use other button color

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Change name of component

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Fix merge issues and make toc work again

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* pin dependencies

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* remove blank line

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* pin dependency

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Fix anchors

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Add use memo

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Add change log entry for removal of custom slugify
2020-06-29 17:51:40 +02:00
Philip Molares
fe55ef7e13 changed comment in markdown-renderer.scss file to explain why the usage of * is necessary
see https://github.com/codimd/react-client/pull/271#pullrequestreview-437942115
2020-06-27 11:23:22 +02:00
Philip Molares
937a2e9eb9
View mode wider (#271)
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>
2020-06-25 22:38:10 +02:00
Erik Michelson
9e6edb0aeb
Add blockquote extras ([name=...], [time=...], [color=...]) (#249)
* 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
2020-06-22 23:37:20 +02:00
Erik Michelson
fd378cf89b
Added TOC and anchors for headings (#243)
* 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>
2020-06-21 14:04:37 +02:00
mrdrogdrog
7e9a828d44
Refactor video-util.ts and rename markdown-preview (#233)
* Refactor video-util.ts
* Rename markdown-preview to markdown-renderer and refactor some methods

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-20 21:05:24 +02:00
Renamed from src/components/editor/markdown-preview/markdown-preview.scss (Browse further)