Make note bodies smaller and simpler for embedded notes
This commit is contained in:
@@ -527,7 +527,6 @@ let Note = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
set_text: function($note_body, $note_box, text) {
|
set_text: function($note_body, $note_box, text) {
|
||||||
Note.Body.display_text($note_body, text);
|
|
||||||
if (Note.embed) {
|
if (Note.embed) {
|
||||||
const $note_inner_box = $note_box.find("div.note-box-inner-border");
|
const $note_inner_box = $note_box.find("div.note-box-inner-border");
|
||||||
Note.Body.display_text($note_inner_box, text);
|
Note.Body.display_text($note_inner_box, text);
|
||||||
@@ -537,6 +536,8 @@ let Note = {
|
|||||||
// Clear the font size so that the fonts will be scaled to the current value
|
// Clear the font size so that the fonts will be scaled to the current value
|
||||||
$note_inner_box.css("font-size", "");
|
$note_inner_box.css("font-size", "");
|
||||||
Note.Box.copy_style_attributes($note_box);
|
Note.Box.copy_style_attributes($note_box);
|
||||||
|
} else {
|
||||||
|
Note.Body.display_text($note_body, text);
|
||||||
}
|
}
|
||||||
Note.Body.resize($note_body);
|
Note.Body.resize($note_body);
|
||||||
Note.Body.bound_position($note_body);
|
Note.Body.bound_position($note_body);
|
||||||
@@ -948,9 +949,11 @@ let Note = {
|
|||||||
container.appendChild($note_body[0]);
|
container.appendChild($note_body[0]);
|
||||||
$note_body.data("original-body", original_body);
|
$note_body.data("original-body", original_body);
|
||||||
Note.Box.scale($note_box);
|
Note.Box.scale($note_box);
|
||||||
Note.Body.display_text($note_body, sanitized_body);
|
|
||||||
if (Note.embed) {
|
if (Note.embed) {
|
||||||
Note.Body.display_text($note_box.children("div.note-box-inner-border"), sanitized_body);
|
Note.Body.display_text($note_box.children("div.note-box-inner-border"), sanitized_body);
|
||||||
|
Note.Body.display_text($note_body, "Click to edit.");
|
||||||
|
} else {
|
||||||
|
Note.Body.display_text($note_body, sanitized_body);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user