Fix documentation build system - resolve becca module instance issue

Fixed the issue where multiple becca instances were being created due to inconsistent module import paths. The solution was to export becca from becca_loader and access it from there, ensuring a single instance is used throughout the build process.

Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-11-02 22:18:49 +00:00
parent 01deab9c79
commit 0c6a57d3bb
89 changed files with 568 additions and 5 deletions

View File

@@ -0,0 +1,7 @@
declare global {
interface Window {
editor: ClassicEditor;
}
}
import { ClassicEditor } from 'ckeditor5';
import 'ckeditor5/ckeditor5.css';

View File

@@ -0,0 +1,81 @@
import { ClassicEditor, Autoformat, Base64UploadAdapter, BlockQuote, Bold, Code, CodeBlock, Essentials, Heading, Image, ImageCaption, ImageStyle, ImageToolbar, ImageUpload, Indent, Italic, Link, List, MediaEmbed, Paragraph, Table, TableToolbar } from 'ckeditor5';
import CKEditorInspector from '@ckeditor/ckeditor5-inspector';
import Math from '../src/math.js';
import 'ckeditor5/ckeditor5.css';
ClassicEditor
.create(document.getElementById('editor'), {
licenseKey: 'GPL',
plugins: [
Math,
Essentials,
Autoformat,
BlockQuote,
Bold,
Heading,
Image,
ImageCaption,
ImageStyle,
ImageToolbar,
ImageUpload,
Indent,
Italic,
Link,
List,
MediaEmbed,
Paragraph,
Table,
TableToolbar,
CodeBlock,
Code,
Base64UploadAdapter
],
toolbar: [
'undo',
'redo',
'|',
'math',
'|',
'heading',
'|',
'bold',
'italic',
'link',
'code',
'bulletedList',
'numberedList',
'|',
'outdent',
'indent',
'|',
'uploadImage',
'blockQuote',
'insertTable',
'mediaEmbed',
'codeBlock'
],
image: {
toolbar: [
'imageStyle:inline',
'imageStyle:block',
'imageStyle:side',
'|',
'imageTextAlternative'
]
},
table: {
contentToolbar: [
'tableColumn',
'tableRow',
'mergeTableCells'
]
}
})
.then(editor => {
window.editor = editor;
CKEditorInspector.attach(editor);
window.console.log('CKEditor 5 is ready.', editor);
})
.catch(err => {
window.console.error(err.stack);
});
//# sourceMappingURL=ckeditor.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ckeditor.js","sourceRoot":"","sources":["ckeditor.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,aAAa,EACb,UAAU,EACV,mBAAmB,EACnB,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,UAAU,EACV,OAAO,EACP,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,MAAM,EACN,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,SAAS,EACT,KAAK,EACL,YAAY,EACZ,MAAM,WAAW,CAAC;AAEnB,OAAO,iBAAiB,MAAM,+BAA+B,CAAC;AAE9D,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,OAAO,yBAAyB,CAAC;AAEjC,aAAa;KACX,MAAM,CAAE,QAAQ,CAAC,cAAc,CAAE,QAAQ,CAAG,EAAE;IAC9C,UAAU,EAAE,KAAK;IACjB,OAAO,EAAE;QACR,IAAI;QACJ,UAAU;QACV,UAAU;QACV,UAAU;QACV,IAAI;QACJ,OAAO;QACP,KAAK;QACL,YAAY;QACZ,UAAU;QACV,YAAY;QACZ,WAAW;QACX,MAAM;QACN,MAAM;QACN,IAAI;QACJ,IAAI;QACJ,UAAU;QACV,SAAS;QACT,KAAK;QACL,YAAY;QACZ,SAAS;QACT,IAAI;QACJ,mBAAmB;KACnB;IACD,OAAO,EAAE;QACR,MAAM;QACN,MAAM;QACN,GAAG;QACH,MAAM;QACN,GAAG;QACH,SAAS;QACT,GAAG;QACH,MAAM;QACN,QAAQ;QACR,MAAM;QACN,MAAM;QACN,cAAc;QACd,cAAc;QACd,GAAG;QACH,SAAS;QACT,QAAQ;QACR,GAAG;QACH,aAAa;QACb,YAAY;QACZ,aAAa;QACb,YAAY;QACZ,WAAW;KACX;IACD,KAAK,EAAE;QACN,OAAO,EAAE;YACR,mBAAmB;YACnB,kBAAkB;YAClB,iBAAiB;YACjB,GAAG;YACH,sBAAsB;S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