Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/content/1_docs/4_form-fields/02_wysiwyg.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ $wysiwygOptions = [
'bold',
'italic',
'underline',
'subscript',
'superscript',
'strike',
'blockquote',
'code-block',
Expand Down
5 changes: 5 additions & 0 deletions frontend/icons-wysiwyg/wysiwyg_subscript.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions frontend/icons-wysiwyg/wysiwyg_superscript.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions frontend/js/components/WysiwygTiptap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@
v-if="toolbar.underline"
:isActive="editor.isActive('underline')"
@btn:click="editor.chain().focus().toggleUnderline().run()"/>
<wysiwyg-menu-bar-btn icon="subscript"
v-if="toolbar.subscript"
:isActive="editor.isActive('subscript')"
@btn:click="editor.chain().focus().toggleSubscript().run()"/>
<wysiwyg-menu-bar-btn icon="superscript"
v-if="toolbar.superscript"
:isActive="editor.isActive('superscript')"
@btn:click="editor.chain().focus().toggleSuperscript().run()"/>

<wysiwyg-menu-bar-btn icon="hr"
v-if="toolbar.hr"
Expand Down Expand Up @@ -253,6 +261,8 @@
import TableRow from '@tiptap/extension-table-row'
import TableCell from '@tiptap/extension-table-cell'
import TableHeader from '@tiptap/extension-table-header'
import Subscript from '@tiptap/extension-subscript'
import Superscript from '@tiptap/extension-superscript'
import {mapState} from 'vuex'

import StandaloneBrowser from "@/components/StandaloneBrowser.vue";
Expand Down Expand Up @@ -611,6 +621,14 @@
extensions.push(Underline)
break;
}
case 'subscript': {
extensions.push(Subscript)
break;
}
case 'superscript': {
extensions.push(Superscript)
break;
}
case 'table': {
extensions.push(Table.configure({
resizable: false
Expand Down
Loading
Loading