Skip to content

Commit

Permalink
add more plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
khanzadimahdi committed May 19, 2024
1 parent 0551fd0 commit 6d020c5
Show file tree
Hide file tree
Showing 6 changed files with 866 additions and 1,202 deletions.
2 changes: 2 additions & 0 deletions frontend/components/card/medium.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
line-clamp: 2;
-webkit-line-clamp: 2;
text-align: justify;
line-height: normal;
}
figure img {
Expand All @@ -50,6 +51,7 @@
-webkit-box-orient: vertical;
line-clamp: 1;
-webkit-line-clamp: 1;
line-height: normal;
}
@media screen and (max-width: 995.9px) {
Expand Down
85 changes: 82 additions & 3 deletions frontend/components/rich-editor.client.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,89 @@
<template>
<ckeditor :editor="ClassicEditor" />
<ckeditor :editor="ClassicEditor" :config="config" />
</template>

<script setup>
import CKEditor from '@ckeditor/ckeditor5-vue';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
import ClassicEditor from '@jaroya/ckeditor5-build-full'
const config = {
language: 'fa',
toolbar: {
items: [
'undo',
'redo',
'|',
'heading',
'fontSize',
'|',
'removeFormat',
'link',
'bold',
'italic',
'underline',
'|',
'superscript',
'subscript',
'|',
'bulletedList',
'numberedList',
'todolist',
'|',
'alignment',
'outdent',
'indent',
'|',
'insertTable',
'blockQuote',
'mediaEmbed',
'|',
'codeBlock',
'code',
'specialCharacters',
'horizontalLine',
'|',
'sourceEditing',
]
},
image: {
toolbar: [
'imageTextAlternative',
'toggleImageCaption',
'imageStyle:inline',
'imageStyle:block',
'imageStyle:side'
],
},
table: {
contentToolbar: [
'tableColumn',
'tableRow',
'mergeTableCells',
'tableCellProperties',
'tableProperties'
]
},
codeBlock: {
languages: [
{ language: 'plaintext', label: 'Plain text' },
{ language: 'go', label: 'Golang' },
{ language: 'c', label: 'C' },
{ language: 'cs', label: 'C#' },
{ language: 'cpp', label: 'C++' },
{ language: 'css', label: 'CSS' },
{ language: 'diff', label: 'Diff' },
{ language: 'html', label: 'HTML' },
{ language: 'java', label: 'Java' },
{ language: 'javascript', label: 'JavaScript' },
{ language: 'php', label: 'PHP' },
{ language: 'python', label: 'Python' },
{ language: 'ruby', label: 'Ruby' },
{ language: 'typescript', label: 'TypeScript' },
{ language: 'json', label: 'JSON' },
{ language: 'xml', label: 'XML' }
]
}
}
const ckeditor = CKEditor.component
</script>
</script>
Loading

0 comments on commit 6d020c5

Please sign in to comment.