require(["notebook/js/widget"], function(){ var StringWidgetModel = IPython.WidgetModel.extend({}); IPython.notebook.widget_manager.register_widget_model('StringWidgetModel', StringWidgetModel); var LabelView = IPython.WidgetView.extend({ // Called when view is rendered. render : function(){ this.$el .html(''); this.$label = $('
') .addClass(this.model.comm.comm_id) .appendTo(this.$el); this.update(); // Set defaults. }, // Handles: Backend -> Frontend Sync // Frontent -> Frontend Sync update : function(){ this.$label.html(this.model.get('value')); }, }); IPython.notebook.widget_manager.register_widget_view('LabelView', LabelView); var TextareaView = IPython.WidgetView.extend({ // Called when view is rendered. render : function(){ this.$el .html('') .addClass(this.model.comm.comm_id); this.$textbox = $('