Skip to content

Commit

Permalink
Merge pull request #11 from parmentelat/multicells
Browse files Browse the repository at this point in the history
apply changes to all selected cells, not just the active one
  • Loading branch information
parmentelat authored Dec 3, 2023
2 parents 0ec0608 + 24bdaec commit 7e3d7da
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 7e3d7da

Please sign in to comment.