mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-30 22:59:52 +02:00
Updated ckeditor and use new mono package
This commit is contained in:
parent
9eb8e33e09
commit
74fef78120
14 changed files with 1770 additions and 892 deletions
|
@ -22,7 +22,7 @@ import PartDBLabelEditing from "./PartDBLabelEditing";
|
|||
|
||||
import "./PartDBLabel.css";
|
||||
|
||||
import Plugin from "@ckeditor/ckeditor5-core/src/plugin";
|
||||
import {Plugin} from "ckeditor5";
|
||||
|
||||
export default class PartDBLabel extends Plugin {
|
||||
static get requires() {
|
||||
|
@ -32,4 +32,4 @@ export default class PartDBLabel extends Plugin {
|
|||
static get pluginName() {
|
||||
return 'PartDBLabel';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Command from '@ckeditor/ckeditor5-core/src/command';
|
||||
import {Command} from 'ckeditor5';
|
||||
|
||||
export default class PartDBLabelCommand extends Command {
|
||||
execute( { value } ) {
|
||||
|
@ -47,4 +47,4 @@ export default class PartDBLabelCommand extends Command {
|
|||
|
||||
this.isEnabled = isAllowed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
||||
import {Plugin} from 'ckeditor5';
|
||||
import PartDBLabelCommand from "./PartDBLabelCommand";
|
||||
|
||||
import { toWidget } from '@ckeditor/ckeditor5-widget/src/utils';
|
||||
import Widget from '@ckeditor/ckeditor5-widget/src/widget';
|
||||
import { toWidget } from 'ckeditor5';
|
||||
import {Widget} from 'ckeditor5';
|
||||
|
||||
export default class PartDBLabelEditing extends Plugin {
|
||||
static get requires() { // ADDED
|
||||
|
@ -102,4 +102,4 @@ export default class PartDBLabelEditing extends Plugin {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
||||
import {Plugin} from 'ckeditor5';
|
||||
|
||||
require('./lang/de.js');
|
||||
|
||||
import { addListToDropdown, createDropdown } from '@ckeditor/ckeditor5-ui/src/dropdown/utils';
|
||||
import { addListToDropdown, createDropdown } from 'ckeditor5';
|
||||
|
||||
import Collection from '@ckeditor/ckeditor5-utils/src/collection';
|
||||
import Model from '@ckeditor/ckeditor5-ui/src/model';
|
||||
import {Collection} from 'ckeditor5';
|
||||
import {Model} from 'ckeditor5';
|
||||
|
||||
export default class PartDBLabelUI extends Plugin {
|
||||
init() {
|
||||
|
@ -187,4 +187,4 @@ function getDropdownItemsDefinitions(t) {
|
|||
}
|
||||
|
||||
return itemDefinitions;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Plugin } from 'ckeditor5/src/core';
|
||||
import GFMDataProcessor from '@ckeditor/ckeditor5-markdown-gfm/src/gfmdataprocessor';
|
||||
import { Plugin } from 'ckeditor5';
|
||||
import {MarkdownGfmDataProcessor} from '@ckeditor/ckeditor5-markdown-gfm';
|
||||
|
||||
const ALLOWED_TAGS = [
|
||||
//Common elements
|
||||
|
@ -57,7 +57,7 @@ export default class ExtendedMarkdown extends Plugin {
|
|||
constructor( editor ) {
|
||||
super( editor );
|
||||
|
||||
editor.data.processor = new GFMDataProcessor( editor.data.viewDocument );
|
||||
editor.data.processor = new MarkdownGfmDataProcessor( editor.data.viewDocument );
|
||||
for (const tag of ALLOWED_TAGS) {
|
||||
editor.data.processor.keepHtml(tag);
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Plugin } from 'ckeditor5/src/core';
|
||||
import GFMDataProcessor from '@ckeditor/ckeditor5-markdown-gfm/src/gfmdataprocessor';
|
||||
import {Plugin} from 'ckeditor5';
|
||||
import {MarkdownGfmDataProcessor} from '@ckeditor/ckeditor5-markdown-gfm';
|
||||
|
||||
const ALLOWED_TAGS = [
|
||||
//Common elements
|
||||
|
@ -46,7 +46,7 @@ export default class ExtendedMarkdownInline extends Plugin {
|
|||
constructor( editor ) {
|
||||
super( editor );
|
||||
|
||||
editor.data.processor = new GFMDataProcessor( editor.data.viewDocument );
|
||||
editor.data.processor = new MarkdownGfmDataProcessor( editor.data.viewDocument );
|
||||
for (const tag of ALLOWED_TAGS) {
|
||||
editor.data.processor.keepHtml(tag);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
||||
import {Plugin} from 'ckeditor5';
|
||||
|
||||
export default class SingleLinePlugin extends Plugin {
|
||||
init() {
|
||||
|
@ -42,7 +42,7 @@ export default class SingleLinePlugin extends Plugin {
|
|||
//We can not use the dataTransfer.setData method because the old object is somehow protected
|
||||
data.dataTransfer = new DataTransfer();
|
||||
data.dataTransfer.setData("text", cleaned);
|
||||
|
||||
|
||||
}, { priority: 'high' } );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SpecialCharacters from '@ckeditor/ckeditor5-special-characters/src/specialcharacters';
|
||||
import SpecialCharactersEssentials from '@ckeditor/ckeditor5-special-characters/src/specialcharactersessentials';
|
||||
import SpecialCharacters from 'ckeditor5';
|
||||
import SpecialCharactersEssentials from 'ckeditor5';
|
||||
|
||||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
||||
import {Plugin} from 'ckeditor5';
|
||||
|
||||
const emoji = require('emoji.json');
|
||||
|
||||
|
@ -106,4 +106,4 @@ export default class SpecialCharactersEmoji extends Plugin {
|
|||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue