Let's say I select 2 different cells and then attempt to replace their content using
NotebookWrite inside a button. How might I replace each cell's content individually instead of the current functionality I am getting.
Button["Write", NotebookWrite[EvaluationNotebook, "Write"]] Dynamic[Refresh[NotebookRead[SelectedNotebook],UpdateInterval -> 1]]
When I click on the
Write button, only the last selected
Cell gets replaced.
Is there a safe technique to replace each cell with unique content?
I am not looking for workarounds, unless the workaround is 100% safe. In my opinion it would make a lot of sense for Mathematica to have built in a technique for replacing multiple selected cells considering it allows selection of multiple cells.