From 24bdaecea35e6c088128cfb90d0bc7adfb172553 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Sun, 3 Dec 2023 11:36:33 +0100 Subject: [PATCH] apply changes to all selected cells, not just the active one close #10 --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index bee6ed0..477da5d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,7 +11,7 @@ import { ICommandPalette, ToolbarButton } from '@jupyterlab/apputils' import { INotebookTracker } from '@jupyterlab/notebook' import { ISettingRegistry } from '@jupyterlab/settingregistry' import { Cell } from '@jupyterlab/cells' - + import { Scope, apply_on_cells } from 'jupyterlab-celltagsclasses' import { md_toggle_multi } from 'jupyterlab-celltagsclasses' @@ -59,7 +59,7 @@ const plugin: JupyterFrontEndPlugin = { app.commands.addCommand(command, { label: `Toogle Cell to ${num}/${den} of Full Width`, execute: () => - apply_on_cells(notebookTracker, Scope.Active, (cell: Cell) => { + apply_on_cells(notebookTracker, Scope.Multiple, (cell: Cell) => { md_toggle_multi( cell, 'tags', @@ -80,7 +80,7 @@ const plugin: JupyterFrontEndPlugin = { app.commands.addCommand(command, { label: 'Restore Full Cell Width', execute: () => - apply_on_cells(notebookTracker, Scope.Active, (cell: Cell) => { + apply_on_cells(notebookTracker, Scope.Multiple, (cell: Cell) => { md_toggle_multi(cell, 'tags', '', ALL_GRIDWIDTHS_FULL) }) })