//---------------------------------------------------------------------------- // 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 Default //============================================================================ /** * Example Use for the CellToolbar library */ // IIFE without asignement, we don't modifiy the IPython namespace (function (IPython) { "use strict"; var CellToolbar = IPython.CellToolbar; var raw_edit = function(cell){ var md = cell.metadata var error_div = $('
').css('color','red') var textarea = $('') .attr('rows','13') .attr('cols','75') .attr('name','metadata') .text(JSON.stringify(md, null,4)||''); var dialogform = $('').attr('title','Edit the metadata') .append( $('').append( $('').append( $('') .attr('for','metadata') .text("Manually edit the JSON below to manipulate the metadata for this cell. This assumes you know what you are doing and won't complain if it breaks your notebook. We also recommend putting your metadata attributes in an appropriately named sub-structure, so they don't conflict with those of others.") ) .append(error_div) .append($('