-
Notifications
You must be signed in to change notification settings - Fork 1
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
0551fd0
commit 6d020c5
Showing
6 changed files
with
866 additions
and
1,202 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
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,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> |
Oops, something went wrong.