mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-23 03:27:05 -04:00
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
This commit is contained in:
parent
e03da3bd76
commit
9e6edb0aeb
8 changed files with 103 additions and 1 deletions
|
@ -15,6 +15,11 @@ const Editor: React.FC = () => {
|
|||
const [markdownContent, setMarkdownContent] = useState(`# Embedding demo
|
||||
[TOC]
|
||||
|
||||
## Blockquote
|
||||
> Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
|
||||
> Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
|
||||
> [color=red] [name=John Doe] [time=2020-06-21 22:50]
|
||||
|
||||
## Slideshare
|
||||
{%slideshare mazlan1/internet-of-things-the-tip-of-an-iceberg %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue