mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-07 14:50:56 +00:00
4.0.0-rc13.1
* Changed: Open markdown links in new tabs.
This commit is contained in:
parent
c9d743c296
commit
006631b6e0
4 changed files with 18 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
|||
<script>
|
||||
|
||||
import MD from 'markdown-it';
|
||||
import MILA from 'markdown-it-link-attributes';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
@ -13,10 +14,19 @@ export default {
|
|||
|
||||
computed: {
|
||||
md() {
|
||||
return new MD({
|
||||
const md = new MD({
|
||||
html: false,
|
||||
linkify: true
|
||||
});
|
||||
|
||||
md.use(MILA, {
|
||||
attrs: {
|
||||
target: '_blank',
|
||||
rel: 'noopener'
|
||||
}
|
||||
});
|
||||
|
||||
return md;
|
||||
},
|
||||
|
||||
output() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue