Skip to content

Commit

Permalink
Fixed #26
Browse files Browse the repository at this point in the history
  • Loading branch information
yrahul3910 committed Feb 18, 2018
1 parent c19c2ce commit c708a88
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
and **double asterisks** for <b>bold</b></span>
</div>
<div class="input-control textarea">
<textarea rows="15" cols="70"></textarea>
<textarea id="entryTextarea" rows="15" cols="70"></textarea>
</div>
<div style="display: flex" id="emoji-picker">
<div id="emoji-list">
Expand Down
10 changes: 5 additions & 5 deletions app/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ $("#newEntry").click(() => {
// New entry dialog button click handlers
$("#addEntry").click(() => {
let date = new Date($("#date").val());
let content = $("textarea").val();
let content = $("#entryTextarea").val();

let isNewEntry; // is it a new entry or an updation?
if ($("#addEntry").text() === "Add Entry")
Expand Down Expand Up @@ -357,7 +357,7 @@ $("#addEntry").click(() => {
});
metroDialog.close("#editDialog");

$("textarea").val("");
$("#entryTextarea").val("");
$("#selectFile").val("");
encodedImages = [];
});
Expand Down Expand Up @@ -385,12 +385,12 @@ $("#updateEntry").click(() => {

$("#date").val(moment(date).format("YYYY-M-D"));
$("select").val(entry.sentiment);
$("textarea").val(entry.content);
$("#entryTextarea").val(entry.content);
});

$("#cancelEntry").click(() => {
metroDialog.close("#editDialog");
$("textarea").val("");
$("#entryTextarea").val("");
});


Expand Down Expand Up @@ -616,7 +616,7 @@ $("#selectFile").on("change", () => {
$("#preview").click(() => {
metroDialog.open("#previewDialog");
$(".dialog-overlay").css("background", "rgba(29, 29, 29, 0.7");
$("#renderedMarkdown").html(converter.makeHtml($("textarea").val()));
$("#renderedMarkdown").html(converter.makeHtml($("#entryTextarea").val()));
emojify.run(document.getElementById("renderedMarkdown"));
});

Expand Down
4 changes: 4 additions & 0 deletions css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ body {
-webkit-app-region: no-drag;
}

#entryTextarea {
overflow-x: hidden;
}

.h3 {
font-size: 1.17em;
font-weight: bold;
Expand Down

0 comments on commit c708a88

Please sign in to comment.