Skip to content

Instantly share code, notes, and snippets.

@doowon
Created July 22, 2016 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doowon/da796654beb2e3154760b8bd9d02d172 to your computer and use it in GitHub Desktop.
Save doowon/da796654beb2e3154760b8bd9d02d172 to your computer and use it in GitHub Desktop.
Never allow markdown cells to be editable.
// When a cell is clicked and the cell's mode is changed to the edit mode
// Then, this below event is called.
$([IPython.events]).on("edit_mode.Cell", function () {
if (IPython.notebook.get_selected_cell().cell_type == "markdown") {
IPython.notebook.execute_selected_cells();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment