returns a list of CellObject expressions corresponding to the currently selected cells in notebook.
returns the currently selected cells in the notebook in which this function is being evaluated.
Details and Options
- If no cells are selected, SelectedCells returns an empty list.
- If the selection is inside of a cell, SelectedCells returns the cell containing the selection.
- SelectedCells[notebook] is equivalent to Cells[NotebookSelection[notebook]].
- If the selection is inside of an inline cell, then SelectedCells will return the CellObject corresponding to the inline cell. The setting AllowInlineCells->False may be given to cause it to return the top-level cell that contains the selected inline cell.
Examplesopen allclose all
Basic Examples (3)
Wolfram Research (2014), SelectedCells, Wolfram Language function, https://reference.wolfram.com/language/ref/SelectedCells.html.
Wolfram Language. 2014. "SelectedCells." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SelectedCells.html.
Wolfram Language. (2014). SelectedCells. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SelectedCells.html