mirror of
https://github.com/zadam/trilium.git
synced 2026-05-06 19:47:26 +02:00
chore(ckeditor/include_note): remove debug logs
This commit is contained in:
@@ -14,15 +14,10 @@ export default class IncludeNoteBoxSizeDropdown extends Plugin {
|
||||
const editor = this.editor;
|
||||
const componentFactory = editor.ui.componentFactory;
|
||||
|
||||
console.log("[IncludeNoteBoxSizeDropdown] Initializing");
|
||||
|
||||
const itemDefinitions = this._getBoxSizeListItemDefinitions();
|
||||
const command = editor.commands.get(BOX_SIZE_COMMAND_NAME) as Command & { value: BoxSizeValue | null };
|
||||
|
||||
console.log("[IncludeNoteBoxSizeDropdown] Command:", command);
|
||||
|
||||
componentFactory.add("includeNoteBoxSizeDropdown", _locale => {
|
||||
console.log("[IncludeNoteBoxSizeDropdown] Creating dropdown component");
|
||||
const dropdownView = createDropdown(editor.locale, DropdownButtonView);
|
||||
dropdownView.buttonView.set({
|
||||
withText: true,
|
||||
|
||||
@@ -12,8 +12,6 @@ export default class IncludeNoteToolbar extends Plugin {
|
||||
const editor = this.editor;
|
||||
const widgetToolbarRepository = editor.plugins.get(WidgetToolbarRepository);
|
||||
|
||||
console.log("[IncludeNoteToolbar] Registering toolbar");
|
||||
|
||||
widgetToolbarRepository.register("includeNote", {
|
||||
items: [
|
||||
"includeNoteBoxSizeDropdown"
|
||||
@@ -21,20 +19,11 @@ export default class IncludeNoteToolbar extends Plugin {
|
||||
balloonClassName: "ck-toolbar-container include-note-toolbar",
|
||||
getRelatedElement(selection) {
|
||||
const selectedElement = selection.getSelectedElement();
|
||||
console.log("[IncludeNoteToolbar] getRelatedElement called, selectedElement:", selectedElement);
|
||||
|
||||
if (selectedElement) {
|
||||
console.log("[IncludeNoteToolbar] Element name:", selectedElement.name);
|
||||
console.log("[IncludeNoteToolbar] Element classes:", selectedElement.getAttribute("class"));
|
||||
console.log("[IncludeNoteToolbar] isWidget:", isWidget(selectedElement));
|
||||
}
|
||||
|
||||
if (selectedElement && isIncludeNoteWidget(selectedElement)) {
|
||||
console.log("[IncludeNoteToolbar] Found include note widget, returning element");
|
||||
return selectedElement;
|
||||
}
|
||||
|
||||
console.log("[IncludeNoteToolbar] No include note widget found");
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -191,7 +191,6 @@ class IncludeNoteBoxSizeCommand extends Command {
|
||||
declare value: BoxSizeValue | null;
|
||||
|
||||
override execute( options: { value: BoxSizeValue } ) {
|
||||
console.log("[IncludeNoteBoxSizeCommand] execute called with:", options);
|
||||
const model = this.editor.model;
|
||||
const includeNoteElement = this._getSelectedIncludeNote();
|
||||
|
||||
@@ -207,7 +206,6 @@ class IncludeNoteBoxSizeCommand extends Command {
|
||||
|
||||
this.isEnabled = !!includeNoteElement;
|
||||
this.value = includeNoteElement?.getAttribute( 'boxSize' ) as BoxSizeValue | null ?? null;
|
||||
console.log("[IncludeNoteBoxSizeCommand] refresh - isEnabled:", this.isEnabled, "value:", this.value);
|
||||
}
|
||||
|
||||
private _getSelectedIncludeNote() {
|
||||
|
||||
Reference in New Issue
Block a user