mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-04 14:13:52 +09:00
Migrate CKEditor to new installation method (#2328)
This commit is contained in:
1 parent
62d134644c
commit
22dfd5f9ab
4 files changed
+63
-83
No files matched your search
@@ -16,12 +16,5 @@
|
||||
"automergeStrategy": "squash",
|
||||
"constraints": {
|
||||
"php": "~8.1.*"
|
||||
},
|
||||
"packageRules": [
|
||||
{
|
||||
"groupName": "CKEditor",
|
||||
"matchPackagePrefixes": ["@ckeditor/"],
|
||||
"rangeStrategy": "auto"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -7,23 +7,8 @@
|
||||
"build": "webpack --mode production"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ckeditor/ckeditor5-autoformat": "^41.0.0",
|
||||
"@ckeditor/ckeditor5-basic-styles": "^41.0.0",
|
||||
"@ckeditor/ckeditor5-block-quote": "^41.0.0",
|
||||
"@ckeditor/ckeditor5-dev-translations": "^40.0.0",
|
||||
"@ckeditor/ckeditor5-dev-utils": "^40.0.0",
|
||||
"@ckeditor/ckeditor5-editor-classic": "^41.0.0",
|
||||
"@ckeditor/ckeditor5-essentials": "^41.0.0",
|
||||
"@ckeditor/ckeditor5-heading": "^41.0.0",
|
||||
"@ckeditor/ckeditor5-image": "^41.0.0",
|
||||
"@ckeditor/ckeditor5-link": "^41.0.0",
|
||||
"@ckeditor/ckeditor5-list": "^41.0.0",
|
||||
"@ckeditor/ckeditor5-markdown-gfm": "^41.0.0",
|
||||
"@ckeditor/ckeditor5-paragraph": "^41.0.0",
|
||||
"@ckeditor/ckeditor5-paste-from-office": "^41.0.0",
|
||||
"@ckeditor/ckeditor5-source-editing": "^41.0.0",
|
||||
"@ckeditor/ckeditor5-table": "^41.0.0",
|
||||
"@ckeditor/ckeditor5-theme-lark": "^41.0.0",
|
||||
"@ckeditor/ckeditor5-typing": "^41.0.0"
|
||||
"ckeditor5": "^42.0.0"
|
||||
}
|
||||
}
|
||||
Vendored
+59
-57
@@ -1,35 +1,9 @@
|
||||
import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat';
|
||||
import AutoImage from '@ckeditor/ckeditor5-image/src/autoimage';
|
||||
import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote';
|
||||
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
|
||||
import ClassicEditorBase from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
|
||||
import Code from '@ckeditor/ckeditor5-basic-styles/src/code';
|
||||
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';
|
||||
import Heading from '@ckeditor/ckeditor5-heading/src/heading';
|
||||
import Image from '@ckeditor/ckeditor5-image/src/image';
|
||||
import ImageStyle from '@ckeditor/ckeditor5-image/src/imagestyle';
|
||||
import ImageInsertViaUrl from '@ckeditor/ckeditor5-image/src/imageinsertviaurl';
|
||||
import ImageToolbar from '@ckeditor/ckeditor5-image/src/imagetoolbar';
|
||||
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
|
||||
import Link from '@ckeditor/ckeditor5-link/src/link';
|
||||
import List from '@ckeditor/ckeditor5-list/src/list';
|
||||
import Markdown from '@ckeditor/ckeditor5-markdown-gfm/src/markdown';
|
||||
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
|
||||
import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice';
|
||||
import SourceEditing from '@ckeditor/ckeditor5-source-editing/src/sourceediting';
|
||||
import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough';
|
||||
import Table from '@ckeditor/ckeditor5-table/src/table';
|
||||
import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar';
|
||||
import TextTransformation from '@ckeditor/ckeditor5-typing/src/texttransformation';
|
||||
import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline';
|
||||
|
||||
class CKEditor extends ClassicEditorBase {}
|
||||
|
||||
CKEditor.builtinPlugins = [
|
||||
import {
|
||||
Autoformat,
|
||||
AutoImage,
|
||||
BlockQuote,
|
||||
Bold,
|
||||
ClassicEditor as ClassicEditorBase,
|
||||
Code,
|
||||
Essentials,
|
||||
Heading,
|
||||
@@ -48,34 +22,62 @@ CKEditor.builtinPlugins = [
|
||||
Table,
|
||||
TableToolbar,
|
||||
TextTransformation,
|
||||
Underline,
|
||||
];
|
||||
Underline
|
||||
} from 'ckeditor5';
|
||||
|
||||
CKEditor.defaultConfig = {
|
||||
toolbar: {
|
||||
items: [
|
||||
'undo', 'redo',
|
||||
'|',
|
||||
'sourceEditing',
|
||||
'|',
|
||||
'heading',
|
||||
'|',
|
||||
'bold', 'italic', 'underline', 'strikethrough', 'code',
|
||||
'|',
|
||||
'bulletedList', 'numberedList',
|
||||
'|',
|
||||
'link', 'insertTable', 'blockQuote',
|
||||
'|',
|
||||
'insertImage', 'imageStyle:inline', 'imageStyle:wrapText', 'imageStyle:breakText'
|
||||
],
|
||||
},
|
||||
image: {
|
||||
toolbar: ['imageTextAlternative']
|
||||
},
|
||||
table: {
|
||||
defaultHeadings: {rows: 1},
|
||||
contentToolbar: ['tableColumn', 'tableRow', 'mergeTableCells'],
|
||||
},
|
||||
};
|
||||
import 'ckeditor5/ckeditor5.css';
|
||||
|
||||
export default CKEditor;
|
||||
export default class CKEditor extends ClassicEditorBase {
|
||||
static builtinPlugins = [
|
||||
Autoformat,
|
||||
AutoImage,
|
||||
BlockQuote,
|
||||
Bold,
|
||||
Code,
|
||||
Essentials,
|
||||
Heading,
|
||||
Image,
|
||||
ImageStyle,
|
||||
ImageInsertViaUrl,
|
||||
ImageToolbar,
|
||||
Italic,
|
||||
Link,
|
||||
List,
|
||||
Markdown,
|
||||
Paragraph,
|
||||
PasteFromOffice,
|
||||
SourceEditing,
|
||||
Strikethrough,
|
||||
Table,
|
||||
TableToolbar,
|
||||
TextTransformation,
|
||||
Underline,
|
||||
];
|
||||
|
||||
static defaultConfig = {
|
||||
toolbar: {
|
||||
items: [
|
||||
'undo', 'redo',
|
||||
'|',
|
||||
'sourceEditing',
|
||||
'|',
|
||||
'heading',
|
||||
'|',
|
||||
'bold', 'italic', 'underline', 'strikethrough', 'code',
|
||||
'|',
|
||||
'bulletedList', 'numberedList',
|
||||
'|',
|
||||
'link', 'insertTable', 'blockQuote',
|
||||
'|',
|
||||
'insertImage', 'imageStyle:inline', 'imageStyle:wrapText', 'imageStyle:breakText'
|
||||
],
|
||||
},
|
||||
image: {
|
||||
toolbar: ['imageTextAlternative']
|
||||
},
|
||||
table: {
|
||||
defaultHeadings: {rows: 1},
|
||||
contentToolbar: ['tableColumn', 'tableRow', 'mergeTableCells'],
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('node:path');
|
||||
const {styles} = require('@ckeditor/ckeditor5-dev-utils');
|
||||
const { styles } = require('@ckeditor/ckeditor5-dev-utils');
|
||||
const TerserWebpackPlugin = require('terser-webpack-plugin');
|
||||
const {CKEditorTranslationsPlugin} = require('@ckeditor/ckeditor5-dev-translations');
|
||||
const { CKEditorTranslationsPlugin } = require('@ckeditor/ckeditor5-dev-translations');
|
||||
|
||||
module.exports = {
|
||||
performance: {hints: false},
|
||||
|
||||
Reference in new issue
Block a user