feat(editor): set up footnotes plugin

This commit is contained in:
Elian Doran 2025-01-06 20:29:01 +02:00
parent c613ce0c41
commit fea66629f6
4 changed files with 18 additions and 7 deletions

View File

@ -50,7 +50,9 @@
"@ckeditor/ckeditor5-paste-from-office": "43.2.0", "@ckeditor/ckeditor5-paste-from-office": "43.2.0",
"@ckeditor/ckeditor5-table": "43.2.0", "@ckeditor/ckeditor5-table": "43.2.0",
"@ckeditor/ckeditor5-typing": "43.2.0", "@ckeditor/ckeditor5-typing": "43.2.0",
"@triliumnext/ckeditor5-math": "43.2.0-hotfix1" "@ckeditor/ckeditor5-utils": "43.2.0",
"@triliumnext/ckeditor5-math": "43.2.0-hotfix1",
"@triliumnext/ckeditor5-footnotes": "0.0.4-hotfix10"
}, },
"devDependencies": { "devDependencies": {
"@ckeditor/ckeditor5-core": "43.2.0", "@ckeditor/ckeditor5-core": "43.2.0",
@ -75,4 +77,4 @@
"build": "webpack --mode production", "build": "webpack --mode production",
"postbuild": "tsc -p ./tsconfig.types.json" "postbuild": "tsc -p ./tsconfig.types.json"
} }
} }

View File

@ -44,6 +44,7 @@ export default class BalloonEditor extends BalloonEditorBase {
'bulletedList', 'numberedList', 'todoList', 'bulletedList', 'numberedList', 'todoList',
'|', '|',
'blockQuote', 'codeBlock', 'insertTable', 'blockQuote', 'codeBlock', 'insertTable',
'footnote',
{ {
label: "Insert", label: "Insert",
icon: "plus", icon: "plus",

View File

@ -46,6 +46,7 @@ export default class DecoupledEditor extends DecoupledEditorBase {
'blockQuote', 'blockQuote',
'insertTable', 'insertTable',
'codeBlock', 'codeBlock',
'footnote',
{ {
label: "Insert", label: "Insert",
icon: "plus", icon: "plus",

View File

@ -55,9 +55,6 @@ import { GeneralHtmlSupport } from "@ckeditor/ckeditor5-html-support";
import Uploadfileplugin from "../../ckeditor5-file-upload/uploadfileplugin"; import Uploadfileplugin from "../../ckeditor5-file-upload/uploadfileplugin";
import { PageBreak } from '@ckeditor/ckeditor5-page-break'; import { PageBreak } from '@ckeditor/ckeditor5-page-break';
import Math from '@triliumnext/ckeditor5-math/src/math';
import AutoformatMath from '@triliumnext/ckeditor5-math/src/autoformatmath';
import MentionCustomization from './mention_customization'; import MentionCustomization from './mention_customization';
import UploadimagePlugin from './uploadimage'; import UploadimagePlugin from './uploadimage';
import InternalLinkPlugin from './internallink'; import InternalLinkPlugin from './internallink';
@ -70,6 +67,13 @@ import removeFormatLinksPlugin from './remove_format_links';
import {SpecialCharactersEmoji} from "./special_characters_emoji"; import {SpecialCharactersEmoji} from "./special_characters_emoji";
// External plugins
import Math from '@triliumnext/ckeditor5-math/src/math';
import AutoformatMath from '@triliumnext/ckeditor5-math/src/autoformatmath';
import '@triliumnext/ckeditor5-footnotes/src/footnote.css';
import { Footnotes } from '@triliumnext/ckeditor5-footnotes';
export const COMMON_PLUGINS = [ export const COMMON_PLUGINS = [
// essentials package expanded to allow selectively disable Enter and ShiftEnter // essentials package expanded to allow selectively disable Enter and ShiftEnter
Clipboard, Enter, SelectAll, ShiftEnter, Typing, Undo, Clipboard, Enter, SelectAll, ShiftEnter, Typing, Undo,
@ -133,10 +137,13 @@ export const COMMON_PLUGINS = [
ReferenceLink, ReferenceLink,
indentBlockShortcutPlugin, indentBlockShortcutPlugin,
removeFormatLinksPlugin, removeFormatLinksPlugin,
PageBreak,
GeneralHtmlSupport,
// External plugins
Math, Math,
AutoformatMath, AutoformatMath,
PageBreak, Footnotes
GeneralHtmlSupport
]; ];
export const COMMON_SETTINGS = { export const COMMON_SETTINGS = {