Show More
@@ -281,6 +281,7 b' Notebook.prototype.code_to_text = function (index) {' | |||||
281 | this.insert_text_cell_after(i); |
|
281 | this.insert_text_cell_after(i); | |
282 | var target_cell = this.cells()[i+1]; |
|
282 | var target_cell = this.cells()[i+1]; | |
283 | var text = source_element.find("textarea.input_area").val(); |
|
283 | var text = source_element.find("textarea.input_area").val(); | |
|
284 | if (text === "") {text = target_cell.placeholder;}; | |||
284 | target_cell.element.find("textarea.text_cell_input").val(text); |
|
285 | target_cell.element.find("textarea.text_cell_input").val(text); | |
285 | target_cell.element.find("textarea.text_cell_input").html(text); |
|
286 | target_cell.element.find("textarea.text_cell_input").html(text); | |
286 | target_cell.element.find("div.text_cell_render").html(text); |
|
287 | target_cell.element.find("div.text_cell_render").html(text); | |
@@ -430,6 +431,7 b' CodeCell.prototype.set_output_prompt = function (number) {' | |||||
430 |
|
431 | |||
431 | var TextCell = function (notebook) { |
|
432 | var TextCell = function (notebook) { | |
432 | Cell.apply(this, arguments); |
|
433 | Cell.apply(this, arguments); | |
|
434 | this.placeholder = "Type <strong>HTML</strong> and LaTeX: $\\alpha^2$" | |||
433 | }; |
|
435 | }; | |
434 |
|
436 | |||
435 |
|
437 | |||
@@ -437,9 +439,9 b' TextCell.prototype = new Cell();' | |||||
437 |
|
439 | |||
438 |
|
440 | |||
439 | TextCell.prototype.create_element = function () { |
|
441 | TextCell.prototype.create_element = function () { | |
440 |
var cell = $( |
|
442 | var cell = $("<div>").addClass('cell text_cell'). | |
441 | append( |
|
443 | append( | |
442 |
$( |
|
444 | $("<textarea>" + this.placeholder + "</textarea>"). | |
443 | addClass('text_cell_input'). |
|
445 | addClass('text_cell_input'). | |
444 | attr('rows',1). |
|
446 | attr('rows',1). | |
445 | attr('cols',80). |
|
447 | attr('cols',80). |
General Comments 0
You need to be logged in to leave comments.
Login now