diff --git a/_regroup/ckeditor5-mermaid/.editorconfig b/_regroup/ckeditor5-mermaid/.editorconfig
deleted file mode 100644
index 37ea8ff91..000000000
--- a/_regroup/ckeditor5-mermaid/.editorconfig
+++ /dev/null
@@ -1,19 +0,0 @@
-# Configurations to normalize the IDE behavior.
-# http://editorconfig.org/
-
-root = true
-
-[*]
-indent_style = tab
-tab_width = 4
-charset = utf-8
-end_of_line = lf
-trim_trailing_whitespace = true
-insert_final_newline = true
-
-[*.{js,jsx,ts}]
-quote_type = single
-
-[package.json]
-indent_style = space
-tab_width = 2
diff --git a/_regroup/ckeditor5-mermaid/.eslintrc.cjs b/_regroup/ckeditor5-mermaid/.eslintrc.cjs
deleted file mode 100644
index d39acda4f..000000000
--- a/_regroup/ckeditor5-mermaid/.eslintrc.cjs
+++ /dev/null
@@ -1,41 +0,0 @@
-/* eslint-env node */
-
-'use strict';
-
-module.exports = {
- extends: 'ckeditor5',
- root: true,
- ignorePatterns: [
- // Ignore the entire `build/` (the DLL build).
- 'build/**',
- // Ignore the entire `dist/`.
- 'dist/**'
- ],
- rules: {
- // This rule disallows importing core DLL packages directly. Imports should be done using the `ckeditor5` package.
- // Also, importing non-DLL packages is not allowed. If the package requires other features to work, they should be
- // specified as soft-requirements.
- // Read more: https://ckeditor.com/docs/ckeditor5/latest/builds/guides/migration/migration-to-26.html#soft-requirements.
- 'ckeditor5-rules/ckeditor-imports': 'error',
- // This rule disallows importing from any path other than the package main entrypoint.
- 'ckeditor5-rules/allow-imports-only-from-main-package-entry-point': 'error',
- // As required by the ECMAScript (ESM) standard, all imports must include a file extension.
- // If the import does not include it, this rule will try to automatically detect the correct file extension.
- 'ckeditor5-rules/require-file-extensions-in-imports': [
- 'error',
- {
- extensions: [ '.ts', '.js', '.json' ]
- }
- ]
- },
- overrides: [
- {
- files: [ 'tests/**/*.js', 'sample/**/*.js' ],
- rules: {
- // To write complex tests, you may need to import files that are not exported in DLL files by default.
- // Hence, imports CKEditor 5 packages in test files are not checked.
- 'ckeditor5-rules/ckeditor-imports': 'off'
- }
- }
- ]
-};
diff --git a/_regroup/ckeditor5-mermaid/.gitattributes b/_regroup/ckeditor5-mermaid/.gitattributes
deleted file mode 100644
index 9c20d56f7..000000000
--- a/_regroup/ckeditor5-mermaid/.gitattributes
+++ /dev/null
@@ -1,18 +0,0 @@
-* text=auto
-
-*.htaccess eol=lf
-*.cgi eol=lf
-*.sh eol=lf
-
-*.css text
-*.htm text
-*.html text
-*.js text
-*.json text
-*.php text
-*.txt text
-*.md text
-
-*.png -text
-*.gif -text
-*.jpg -text
diff --git a/_regroup/ckeditor5-mermaid/.gitignore b/_regroup/ckeditor5-mermaid/.gitignore
deleted file mode 100644
index d7d45b9d4..000000000
--- a/_regroup/ckeditor5-mermaid/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-.nyc_output/
-coverage/
-node_modules/
-yarn.lock
-tmp/
-build/
-dist
-yarn.error
diff --git a/_regroup/ckeditor5-mermaid/.stylelintrc b/_regroup/ckeditor5-mermaid/.stylelintrc
deleted file mode 100644
index e7e28c8be..000000000
--- a/_regroup/ckeditor5-mermaid/.stylelintrc
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "extends": "stylelint-config-ckeditor5",
- "ignoreFiles": [
- "dist/**/*.css"
- ]
-}
diff --git a/_regroup/ckeditor5-mermaid/LICENSE.md b/_regroup/ckeditor5-mermaid/LICENSE.md
deleted file mode 100644
index f2b8704dd..000000000
--- a/_regroup/ckeditor5-mermaid/LICENSE.md
+++ /dev/null
@@ -1,22 +0,0 @@
-Software License Agreement
-==========================
-
-**CKEditor 5 mermaid feature** (https://ckeditor.com/ckeditor-5/)
-Copyright (c) 2003-2022, [CKSource](http://cksource.com) Holding sp. z o.o. All rights reserved.
-
-Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
-
-Sources of Intellectual Property Included in CKEditor 5 mermaid feature
----------------------------------------------------------------------
-
-Where not otherwise indicated, all CKEditor 5 mermaid feature content is authored by CKSource engineers and consists of CKSource-owned intellectual property.
-
-The following libraries are included in CKEditor 5 mermaid feature under the [MIT license](https://opensource.org/licenses/MIT):
-
-* Lo-Dash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas.
-* mermaid - Copyright (c) 2014 - 2021 Knut Sveidqvist. (MIT License)
-
-Trademarks
-----------
-
-**CKEditor** is a trademark of [CKSource](http://cksource.com) Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
diff --git a/_regroup/ckeditor5-mermaid/README.md b/_regroup/ckeditor5-mermaid/README.md
deleted file mode 100644
index 04c56d87e..000000000
--- a/_regroup/ckeditor5-mermaid/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-CKEditor 5 Mermaid feature
-=================================
-
-Warning: This is an experimental plugin that comes with no support, use it at your own risk.
-
-This package contains a Mermaid feature for CKEditor 5.
-
-## CKEditor 5 Mermaid - Running manual test
-
-You can test all of the features of the `ckeditor5-mermaid` plugin with the manual test sample.
-
-After installing dependencies it's enough to execute the following script at the root of your local clone of the project:
-
-```
-yarn start
-```
-
-## License
-
-See [LICENSE.md](LICENSE.md) file.
-
-### Trademarks
-
-**CKEditor** is a trademark of [CKSource](https://cksource.com) Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
diff --git a/_regroup/ckeditor5-mermaid/package.json b/_regroup/ckeditor5-mermaid/package.json
deleted file mode 100644
index 2a0853fe0..000000000
--- a/_regroup/ckeditor5-mermaid/package.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "name": "@ckeditor/ckeditor5-mermaid",
- "version": "0.0.4",
- "description": "Mermaid widget for CKEditor 5.",
- "private": true,
- "keywords": [
- "ckeditor",
- "ckeditor5",
- "ckeditor 5",
- "ckeditor5-feature",
- "ckeditor5-plugin",
- "ckeditor5-mermaid"
- ],
- "type": "module",
- "main": "src/index.js",
- "license": "SEE LICENSE IN LICENSE.md",
- "author": "CKSource (https://cksource.com/)",
- "homepage": "https://github.com/ckeditor/ckeditor5-mermaid",
- "bugs": "https://github.com/ckeditor/ckeditor5-mermaid/issues",
- "engines": {
- "node": ">=18.0.0",
- "npm": ">=5.7.1"
- },
- "files": [
- "lang",
- "src/**/*.js",
- "src/**/*.css",
- "theme",
- "build",
- "ckeditor5-metadata.json"
- ],
- "dependencies": {
- "ckeditor5": "43.2.0"
- },
- "devDependencies": {
- "@ckeditor/ckeditor5-dev-build-tools": "^42.0.0",
- "@ckeditor/ckeditor5-inspector": "^4.0.0",
- "@ckeditor/ckeditor5-package-tools": "^2.1.0",
- "ckeditor5": "latest",
- "eslint": "^7.32.0",
- "eslint-config-ckeditor5": "^6.0.0",
- "http-server": "^14.1.1",
- "husky": "^4.2.5",
- "lint-staged": "^12.0.0",
- "stylelint": "^13.13.1",
- "stylelint-config-ckeditor5": ">=6.0.0"
- },
- "peerDependencies": {
- "ckeditor5": ">=43.0.0 || ^0.0.0-nightly"
- },
- "scripts": {
- "dll:build": "ckeditor5-package-tools dll:build",
- "dll:serve": "http-server ./ -o sample/dll.html",
- "lint": "eslint --quiet --ext .ts src/",
- "lint:fix": "eslint --quiet --fix --ext .ts src/",
- "stylelint": "stylelint --quiet --allow-empty-input 'theme/**/*.css'",
- "test": "ckeditor5-package-tools test",
- "prepare": "yarn run dll:build",
- "prepublishOnly": "ckeditor5-package-tools export-package-as-javascript",
- "postpublish": "ckeditor5-package-tools export-package-as-typescript",
- "start": "ckeditor5-package-tools start"
- },
- "lint-staged": {
- "**/*.js": [
- "eslint --quiet"
- ],
- "**/*.css": [
- "stylelint --quiet --allow-empty-input"
- ]
- },
- "husky": {
- "hooks": {
- "pre-commit": "lint-staged"
- }
- }
-}
diff --git a/_regroup/ckeditor5-mermaid/sample/ckeditor.js b/_regroup/ckeditor5-mermaid/sample/ckeditor.js
deleted file mode 100644
index 623196c31..000000000
--- a/_regroup/ckeditor5-mermaid/sample/ckeditor.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
- */
-
-/* globals console, window, document */
-
-import { ClassicEditor } from '@ckeditor/ckeditor5-editor-classic';
-import { Typing } from '@ckeditor/ckeditor5-typing';
-import { Paragraph } from '@ckeditor/ckeditor5-paragraph';
-import { Undo } from '@ckeditor/ckeditor5-undo';
-import { Enter } from '@ckeditor/ckeditor5-enter';
-import { Clipboard } from '@ckeditor/ckeditor5-clipboard';
-import { Link } from '@ckeditor/ckeditor5-link';
-import { Bold, Italic } from '@ckeditor/ckeditor5-basic-styles';
-import { CodeBlock } from '@ckeditor/ckeditor5-code-block';
-
-import CKEditorInspector from '@ckeditor/ckeditor5-inspector';
-
-import Mermaid from '../src/mermaid.js';
-
-ClassicEditor
- .create( document.querySelector( '#editor' ), {
- plugins: [
- Typing,
- Paragraph,
- Undo,
- Enter,
- Clipboard,
- Link,
- Bold,
- Italic,
- CodeBlock,
- Mermaid
- ],
- toolbar: [ 'bold', 'italic', 'link', 'undo', 'redo', 'codeBlock', 'mermaid' ],
- codeBlock: {
- languages: [
- { language: 'plaintext', label: 'Plain text', class: '' },
- { language: 'javascript', label: 'JavaScript' },
- { language: 'python', label: 'Python' },
- { language: 'mermaid', label: 'Mermaid' }
- ]
- }
-
- } )
- .then( editor => {
- window.editor = editor;
- CKEditorInspector.attach( editor );
- window.console.log( 'CKEditor 5 is ready.', editor );
- } )
- .catch( err => {
- console.error( err.stack );
- } );
diff --git a/_regroup/ckeditor5-mermaid/sample/index.html b/_regroup/ckeditor5-mermaid/sample/index.html
deleted file mode 100644
index 7b8ac8fd3..000000000
--- a/_regroup/ckeditor5-mermaid/sample/index.html
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
-
- CKEditor 5 Mermaid widget – Development Sample
-
-
-
-
-CKEditor 5 Mermaid widget – Development Sample
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/_regroup/ckeditor5-mermaid/scripts/build-dist.mjs b/_regroup/ckeditor5-mermaid/scripts/build-dist.mjs
deleted file mode 100644
index 55ef3099d..000000000
--- a/_regroup/ckeditor5-mermaid/scripts/build-dist.mjs
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env node
-
-/**
- * @license Copyright (c) 2020-2024, CKSource Holding sp. z o.o. All rights reserved.
- * For licensing, see LICENSE.md.
- */
-
-/* eslint-env node */
-
-import { createRequire } from 'module';
-import upath from 'upath';
-import chalk from 'chalk';
-import { build } from '@ckeditor/ckeditor5-dev-build-tools';
-
-function dist( path ) {
- return upath.join( 'dist', path );
-}
-
-( async () => {
- /**
- * Step 1
- */
- console.log( chalk.cyan( '1/2: Generating NPM build...' ) );
-
- const require = createRequire( import.meta.url );
- const pkg = require( upath.resolve( process.cwd(), './package.json' ) );
-
- await build( {
- input: 'src/index.js',
- output: dist( './index.js' ),
- external: [
- 'ckeditor5',
- 'ckeditor5-premium-features',
- ...Object.keys( {
- ...pkg.dependencies,
- ...pkg.peerDependencies
- } )
- ],
- clean: true,
- sourceMap: true,
- translations: '**/*.po'
- } );
-
- /**
- * Step 2
- */
- console.log( chalk.cyan( '2/2: Generating browser build...' ) );
-
- await build( {
- input: 'src/index.js',
- output: dist( 'browser/index.js' ),
- sourceMap: true,
- minify: true,
- browser: true,
- name: '@ckeditor/ckeditor5-mermaid',
- external: [
- 'ckeditor5',
- 'ckeditor5-premium-features'
- ]
- } );
-} )();
diff --git a/packages/ckeditor5-mermaid/LICENSE.md b/packages/ckeditor5-mermaid/LICENSE.md
index b60c76711..f2b8704dd 100644
--- a/packages/ckeditor5-mermaid/LICENSE.md
+++ b/packages/ckeditor5-mermaid/LICENSE.md
@@ -1,6 +1,22 @@
Software License Agreement
==========================
-Copyright (c) 2025. All rights reserved.
+**CKEditor 5 mermaid feature** (https://ckeditor.com/ckeditor-5/)
+Copyright (c) 2003-2022, [CKSource](http://cksource.com) Holding sp. z o.o. All rights reserved.
-Licensed under the terms of [MIT license](https://opensource.org/licenses/MIT).
+Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
+
+Sources of Intellectual Property Included in CKEditor 5 mermaid feature
+---------------------------------------------------------------------
+
+Where not otherwise indicated, all CKEditor 5 mermaid feature content is authored by CKSource engineers and consists of CKSource-owned intellectual property.
+
+The following libraries are included in CKEditor 5 mermaid feature under the [MIT license](https://opensource.org/licenses/MIT):
+
+* Lo-Dash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas.
+* mermaid - Copyright (c) 2014 - 2021 Knut Sveidqvist. (MIT License)
+
+Trademarks
+----------
+
+**CKEditor** is a trademark of [CKSource](http://cksource.com) Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
diff --git a/packages/ckeditor5-mermaid/README.md b/packages/ckeditor5-mermaid/README.md
index e10a4a752..8ed87bb78 100644
--- a/packages/ckeditor5-mermaid/README.md
+++ b/packages/ckeditor5-mermaid/README.md
@@ -1,21 +1,26 @@
@triliumnext/ckeditor5-mermaid
==============================
-This package was created by the [ckeditor5-package-generator](https://www.npmjs.com/package/ckeditor5-package-generator) package.
+Warning: This is an experimental plugin that comes with no support, use it at your own risk.
+
+This package contains a Mermaid feature for CKEditor 5.
## Table of contents
-* [Developing the package](#developing-the-package)
-* [Available scripts](#available-scripts)
- * [`start`](#start)
- * [`test`](#test)
- * [`lint`](#lint)
- * [`stylelint`](#stylelint)
- * [`build:dist`](#builddist)
- * [`translations:synchronize`](#translationssynchronize)
- * [`translations:validate`](#translationsvalidate)
- * [`ts:build` and `ts:clear`](#tsbuild-and-tsclear)
-* [License](#license)
+- [@triliumnext/ckeditor5-mermaid](#triliumnextckeditor5-mermaid)
+ - [Table of contents](#table-of-contents)
+ - [Developing the package](#developing-the-package)
+ - [Available scripts](#available-scripts)
+ - [`start`](#start)
+ - [`test`](#test)
+ - [`lint`](#lint)
+ - [`stylelint`](#stylelint)
+ - [`build:dist`](#builddist)
+ - [`translations:synchronize`](#translationssynchronize)
+ - [`translations:validate`](#translationsvalidate)
+ - [`ts:build` and `ts:clear`](#tsbuild-and-tsclear)
+ - [License](#license)
+ - [Trademarks](#trademarks)
## Developing the package
@@ -136,6 +141,8 @@ These scripts compile TypeScript and remove the compiled files. They are used in
## License
-The `@triliumnext/ckeditor5-mermaid` package is available under [MIT license](https://opensource.org/licenses/MIT).
+See [LICENSE.md](LICENSE.md) file.
-However, it is the default license of packages created by the [ckeditor5-package-generator](https://www.npmjs.com/package/ckeditor5-package-generator) package and can be changed.
+### Trademarks
+
+**CKEditor** is a trademark of [CKSource](https://cksource.com) Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
diff --git a/packages/ckeditor5-mermaid/package.json b/packages/ckeditor5-mermaid/package.json
index 33582553d..0db18efb8 100644
--- a/packages/ckeditor5-mermaid/package.json
+++ b/packages/ckeditor5-mermaid/package.json
@@ -1,7 +1,7 @@
{
"name": "@triliumnext/ckeditor5-mermaid",
- "version": "0.0.1",
- "description": "A plugin for CKEditor 5.",
+ "version": "0.0.4",
+ "description": "Mermaid widget for CKEditor 5.",
"keywords": [
"ckeditor",
"ckeditor5",
@@ -23,7 +23,9 @@
"./browser/*": null,
"./package.json": "./package.json"
},
- "license": "MIT",
+ "license": "SEE LICENSE IN LICENSE.md",
+ "author": "CKSource (https://cksource.com/)",
+ "homepage": "https://github.com/ckeditor/ckeditor5-mermaid",
"engines": {
"node": ">=18.0.0",
"npm": ">=5.7.1"
diff --git a/_regroup/ckeditor5-mermaid/tests/commands/insertMermaidCommand.js b/packages/ckeditor5-mermaid/tests/commands/insertMermaidCommand.js
similarity index 100%
rename from _regroup/ckeditor5-mermaid/tests/commands/insertMermaidCommand.js
rename to packages/ckeditor5-mermaid/tests/commands/insertMermaidCommand.js
diff --git a/_regroup/ckeditor5-mermaid/tests/commands/mermaidPreviewCommand.js b/packages/ckeditor5-mermaid/tests/commands/mermaidPreviewCommand.js
similarity index 100%
rename from _regroup/ckeditor5-mermaid/tests/commands/mermaidPreviewCommand.js
rename to packages/ckeditor5-mermaid/tests/commands/mermaidPreviewCommand.js
diff --git a/_regroup/ckeditor5-mermaid/tests/commands/mermaidSourceViewCommand.js b/packages/ckeditor5-mermaid/tests/commands/mermaidSourceViewCommand.js
similarity index 100%
rename from _regroup/ckeditor5-mermaid/tests/commands/mermaidSourceViewCommand.js
rename to packages/ckeditor5-mermaid/tests/commands/mermaidSourceViewCommand.js
diff --git a/_regroup/ckeditor5-mermaid/tests/commands/mermaidSplitViewCommand.js b/packages/ckeditor5-mermaid/tests/commands/mermaidSplitViewCommand.js
similarity index 100%
rename from _regroup/ckeditor5-mermaid/tests/commands/mermaidSplitViewCommand.js
rename to packages/ckeditor5-mermaid/tests/commands/mermaidSplitViewCommand.js
diff --git a/_regroup/ckeditor5-mermaid/tests/index.js b/packages/ckeditor5-mermaid/tests/index.js
similarity index 100%
rename from _regroup/ckeditor5-mermaid/tests/index.js
rename to packages/ckeditor5-mermaid/tests/index.js
diff --git a/packages/ckeditor5-mermaid/tests/index.ts b/packages/ckeditor5-mermaid/tests/index.ts
deleted file mode 100644
index a12171195..000000000
--- a/packages/ckeditor5-mermaid/tests/index.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { describe, expect, it } from 'vitest';
-import { Mermaid as MermaidDll, icons } from '../src/index.js';
-import Mermaid from '../src/mermaid.js';
-
-import ckeditor from './../theme/icons/ckeditor.svg';
-
-describe( 'CKEditor5 Mermaid DLL', () => {
- it( 'exports Mermaid', () => {
- expect( MermaidDll ).to.equal( Mermaid );
- } );
-
- describe( 'icons', () => {
- it( 'exports the "ckeditor" icon', () => {
- expect( icons.ckeditor ).to.equal( ckeditor );
- } );
- } );
-} );
diff --git a/_regroup/ckeditor5-mermaid/tests/manual/markdown.html b/packages/ckeditor5-mermaid/tests/manual/markdown.html
similarity index 100%
rename from _regroup/ckeditor5-mermaid/tests/manual/markdown.html
rename to packages/ckeditor5-mermaid/tests/manual/markdown.html
diff --git a/_regroup/ckeditor5-mermaid/tests/manual/markdown.js b/packages/ckeditor5-mermaid/tests/manual/markdown.js
similarity index 100%
rename from _regroup/ckeditor5-mermaid/tests/manual/markdown.js
rename to packages/ckeditor5-mermaid/tests/manual/markdown.js
diff --git a/_regroup/ckeditor5-mermaid/tests/manual/markdown.md b/packages/ckeditor5-mermaid/tests/manual/markdown.md
similarity index 100%
rename from _regroup/ckeditor5-mermaid/tests/manual/markdown.md
rename to packages/ckeditor5-mermaid/tests/manual/markdown.md
diff --git a/_regroup/ckeditor5-mermaid/tests/manual/mermaid.html b/packages/ckeditor5-mermaid/tests/manual/mermaid.html
similarity index 100%
rename from _regroup/ckeditor5-mermaid/tests/manual/mermaid.html
rename to packages/ckeditor5-mermaid/tests/manual/mermaid.html
diff --git a/_regroup/ckeditor5-mermaid/tests/manual/mermaid.js b/packages/ckeditor5-mermaid/tests/manual/mermaid.js
similarity index 100%
rename from _regroup/ckeditor5-mermaid/tests/manual/mermaid.js
rename to packages/ckeditor5-mermaid/tests/manual/mermaid.js
diff --git a/_regroup/ckeditor5-mermaid/tests/manual/mermaid.md b/packages/ckeditor5-mermaid/tests/manual/mermaid.md
similarity index 100%
rename from _regroup/ckeditor5-mermaid/tests/manual/mermaid.md
rename to packages/ckeditor5-mermaid/tests/manual/mermaid.md
diff --git a/_regroup/ckeditor5-mermaid/tests/mermaid.js b/packages/ckeditor5-mermaid/tests/mermaid.js
similarity index 100%
rename from _regroup/ckeditor5-mermaid/tests/mermaid.js
rename to packages/ckeditor5-mermaid/tests/mermaid.js
diff --git a/packages/ckeditor5-mermaid/tests/mermaid.ts b/packages/ckeditor5-mermaid/tests/mermaid.ts
deleted file mode 100644
index 54a811952..000000000
--- a/packages/ckeditor5-mermaid/tests/mermaid.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-import { describe, expect, it, beforeEach, afterEach } from 'vitest';
-import { ClassicEditor, Essentials, Paragraph, Heading } from 'ckeditor5';
-import Mermaid from '../src/mermaid.js';
-
-describe( 'Mermaid', () => {
- it( 'should be named', () => {
- expect( Mermaid.pluginName ).to.equal( 'Mermaid' );
- } );
-
- describe( 'init()', () => {
- let domElement: HTMLElement, editor: ClassicEditor;
-
- beforeEach( async () => {
- domElement = document.createElement( 'div' );
- document.body.appendChild( domElement );
-
- editor = await ClassicEditor.create( domElement, {
- licenseKey: 'GPL',
- plugins: [
- Paragraph,
- Heading,
- Essentials,
- Mermaid
- ],
- toolbar: [
- 'mermaid'
- ]
- } );
- } );
-
- afterEach( () => {
- domElement.remove();
- return editor.destroy();
- } );
-
- it( 'should load Mermaid', () => {
- const myPlugin = editor.plugins.get( 'Mermaid' );
-
- expect( myPlugin ).to.be.an.instanceof( Mermaid );
- } );
-
- it( 'should add an icon to the toolbar', () => {
- expect( editor.ui.componentFactory.has( 'mermaid' ) ).to.equal( true );
- } );
-
- it( 'should add a text into the editor after clicking the icon', () => {
- const icon = editor.ui.componentFactory.create( 'mermaid' );
-
- expect( editor.getData() ).to.equal( '' );
-
- icon.fire( 'execute' );
-
- expect( editor.getData() ).to.equal( 'Hello CKEditor 5!
' );
- } );
- } );
-} );
diff --git a/_regroup/ckeditor5-mermaid/tests/mermaidediting.js b/packages/ckeditor5-mermaid/tests/mermaidediting.js
similarity index 100%
rename from _regroup/ckeditor5-mermaid/tests/mermaidediting.js
rename to packages/ckeditor5-mermaid/tests/mermaidediting.js
diff --git a/_regroup/ckeditor5-mermaid/tests/mermaidtoolbar.js b/packages/ckeditor5-mermaid/tests/mermaidtoolbar.js
similarity index 100%
rename from _regroup/ckeditor5-mermaid/tests/mermaidtoolbar.js
rename to packages/ckeditor5-mermaid/tests/mermaidtoolbar.js
diff --git a/_regroup/ckeditor5-mermaid/tests/mermaidui.js b/packages/ckeditor5-mermaid/tests/mermaidui.js
similarity index 100%
rename from _regroup/ckeditor5-mermaid/tests/mermaidui.js
rename to packages/ckeditor5-mermaid/tests/mermaidui.js