-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
346a838
commit f6d427a
Showing
6 changed files
with
210,580 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,78 @@ | ||
.hljs{background:#282a36;display:block;overflow-x:auto;padding:.5em}.hljs-built_in,.hljs-link,.hljs-section,.hljs-selector-tag{color:#8be9fd}.hljs-keyword{color:#ff79c6}.hljs,.hljs-subst{color:#f8f8f2}.hljs-title{color:#50fa7b}.hljs-addition,.hljs-attr,.hljs-bullet,.hljs-meta,.hljs-name,.hljs-string,.hljs-symbol,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable{color:#f1fa8c}.hljs-comment,.hljs-deletion,.hljs-quote{color:#6272a4}.hljs-doctag,.hljs-keyword,.hljs-literal,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-strong,.hljs-title,.hljs-type{font-weight:700}.hljs-literal,.hljs-number{color:#bd93f9}.hljs-emphasis{font-style:italic} | ||
/* Dracula Theme v1.2.5 | ||
* | ||
* https://github.com/dracula/highlightjs | ||
* | ||
* Copyright 2016-present, All rights reserved | ||
* | ||
* Code licensed under the MIT license | ||
* | ||
* @author Denis Ciccale <[email protected]> | ||
* @author Zeno Rocha <[email protected]> | ||
*/ | ||
.hljs { | ||
display: block; | ||
overflow-x: auto; | ||
padding: 0.5em; | ||
background: #282a36; | ||
} | ||
|
||
.hljs-built_in, | ||
.hljs-selector-tag, | ||
.hljs-section, | ||
.hljs-link { | ||
color: #8be9fd; | ||
} | ||
|
||
.hljs-keyword { | ||
color: #ff79c6; | ||
} | ||
|
||
.hljs, | ||
.hljs-subst { | ||
color: #f8f8f2; | ||
} | ||
|
||
.hljs-title { | ||
color: #50fa7b; | ||
} | ||
|
||
.hljs-string, | ||
.hljs-meta, | ||
.hljs-name, | ||
.hljs-type, | ||
.hljs-attr, | ||
.hljs-symbol, | ||
.hljs-bullet, | ||
.hljs-addition, | ||
.hljs-variable, | ||
.hljs-template-tag, | ||
.hljs-template-variable { | ||
color: #f1fa8c; | ||
} | ||
|
||
.hljs-comment, | ||
.hljs-quote, | ||
.hljs-deletion { | ||
color: #6272a4; | ||
} | ||
|
||
.hljs-keyword, | ||
.hljs-selector-tag, | ||
.hljs-literal, | ||
.hljs-title, | ||
.hljs-section, | ||
.hljs-doctag, | ||
.hljs-type, | ||
.hljs-name, | ||
.hljs-strong { | ||
font-weight: bold; | ||
} | ||
|
||
.hljs-literal, | ||
.hljs-number { | ||
color: #bd93f9; | ||
} | ||
|
||
.hljs-emphasis { | ||
font-style: italic; | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<template> | ||
<span class="whitespace-nowrap"> | ||
<base-button | ||
:isActive="rtlIsActive()" | ||
:isDisabled="mode != 'editor'" | ||
:clickMethod="toggleRtl" | ||
:title="'RTL'" | ||
:icon="['fas', 'paragraph-rtl']" | ||
> | ||
</base-button> | ||
</span> | ||
</template> | ||
|
||
<script> | ||
import BaseButton from './BaseButton.vue'; | ||
export default { | ||
props: ['alignments', 'alignElements', 'defaultAlignment', 'editor', 'mode'], | ||
components: { | ||
BaseButton, | ||
}, | ||
methods: { | ||
rtlIsActive() { | ||
return this.editor ? this.editor.isActive({ dir: 'rtl' }) : false; | ||
}, | ||
toggleRtl() { | ||
if (this.rtlIsActive()) { | ||
this.editor.chain().focus().updateAttributes('paragraph', { dir: 'auto' }).run(); | ||
} else { | ||
this.editor.chain().focus().updateAttributes('paragraph', { dir: 'rtl' }).run(); | ||
this.editor.chain().focus().updateAttributes('heading', { dir: 'rtl' }).run(); | ||
} | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Extension } from '@tiptap/core' | ||
|
||
export default Extension.create({ | ||
name: 'AutoDir', | ||
addGlobalAttributes() { | ||
return [ | ||
{ | ||
types: [ | ||
'heading', | ||
'paragraph', | ||
'bulletList', | ||
'orderedList', | ||
'blockquote', | ||
], | ||
attributes: { | ||
autoDir: { | ||
renderHTML: attributes => ({ | ||
dir: 'rtl', | ||
}), | ||
parseHTML: element => element.dir || 'rtl', | ||
}, | ||
}, | ||
}, | ||
] | ||
}, | ||
}) |