improve demo styling

This commit is contained in:
Philipp Kühn
2018-08-22 16:46:30 +02:00
parent 6d7b9c5144
commit d450be789c
4 changed files with 45 additions and 21 deletions

View File

@@ -26,6 +26,16 @@
}
}
p code {
display: inline-block;
padding: 0 0.4rem;
border-radius: 5px;
font-size: 0.8rem;
font-weight: bold;
background: rgba($color-black, 0.1);
color: rgba($color-black, 0.8);
}
ul,
ol {
padding-left: 1rem;
@@ -34,6 +44,17 @@
a {
color: inherit;
}
blockquote {
border-left: 3px solid rgba($color-black, 0.1);
color: rgba($color-black, 0.8);
padding-left: 0.8rem;
font-style: italic;
p {
margin: 0;
}
}
}
}

View File

@@ -3,16 +3,16 @@
<editor :editable="true" class="editor" @update="onUpdate">
<div class="editor__content" slot="content" slot-scope="props">
<h1>
Markdown Shortcuts
</h1>
<p>
Start a new line and type <code>"#"</code> followed by a space and you will get an H1 headline. 🤯
<h1>
Markdown Shortcuts
</h1>
<p>
Start a new line and type <code>#</code> followed by a space and you will get an H1 headline. 🤯
</p>
<p>
This feature is called <strong>input rules</strong>. There are some of these shortcuts for the most basic nodes available by default. Try <code>"#, ##, ###, …"</code> for headlines, <code>">"</code> for blockquotes, <code>"- or +"</code> for bullet lists. And of course you can add your own input rules.
</p>
</div>
<p>
This feature is called <strong>input rules</strong>. There are some of these shortcuts for the most basic nodes available by default. Try <code>#, ##, ###, </code> for headlines, <code>></code> for blockquotes, <code>- or +</code> for bullet lists. And of course you can add your own input rules.
</p>
</div>
</editor>
</div>
@@ -23,14 +23,14 @@ import Icon from 'Components/Icon'
import { Editor } from 'tiptap'
export default {
components: {
Editor,
Icon,
},
methods: {
onUpdate(state) {
console.log(state.doc.toJSON())
},
},
components: {
Editor,
Icon,
},
methods: {
onUpdate(state) {
console.log(state.doc.toJSON())
},
},
}
</script>

View File

@@ -104,9 +104,11 @@
With regular items
</li>
</ul>
<p>
<blockquote>
It's amazing 👏
</p>
<br />
mom
</blockquote>
</div>
</editor>

View File

@@ -41,7 +41,8 @@ h2,
p,
ul,
ol,
pre {
pre,
blockquote {
margin: 1rem 0;
&:first-child {