Skip to content

Commit

Permalink
apply changes to all selected cells, not just the active one
Browse files Browse the repository at this point in the history
close #10
  • Loading branch information
parmentelat committed Dec 3, 2023
1 parent 0ec0608 commit 24bdaec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -59,7 +59,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
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',
Expand All @@ -80,7 +80,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
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)
})
})
Expand Down

0 comments on commit 24bdaec

Please sign in to comment.