//---------------------------------------------------------------------------- // Copyright (C) 2012 The IPython Development Team // // Distributed under the terms of the BSD License. The full license is in // the file COPYING, distributed as part of this software. //---------------------------------------------------------------------------- //============================================================================ // CellToolbar Example //============================================================================ (function(IPython) { "use strict"; var CellToolbar = IPython.CellToolbar; var raw_cell_preset = []; var select_type = CellToolbar.utils.select_ui_generator([ ["None", "-"], ["LaTeX", "text/latex"], ["reST", "text/restructuredtext"], ["HTML", "text/html"], ["Markdown", "text/markdown"], ["Python", "text/x-python"], ["Custom", "dialog"], ], // setter function(cell, value) { if (value === "-") { delete cell.metadata.raw_mimetype; } else if (value === 'dialog'){ var dialog = $('
').append( $("") .text("Set the MIME type of the raw cell:") ).append( $("