Apply note color in editor

master
Skylar Ittner 5 years ago
parent c04d535c97
commit 3cf9dacbf8

@ -24,6 +24,22 @@ if ($note->getOwnerID() != $_SESSION['uid']) {
$note->saveNote();
?>
<style nonce="<?php echo $SECURE_NONCE; ?>">
.CodeMirror, #note_content, .cm-quote, .editor-preview-side {
background-color: #<?php echo $note->getColor(); ?>;
color: #<?php echo $note->getTextColor(); ?> !important;
caret-color: #<?php echo $note->getTextColor(); ?>;
}
.CodeMirror-cursor {
border-left: 1px solid #<?php echo $note->getTextColor(); ?>;
}
.editor-preview-side hr {
border-top: 1px solid #<?php echo $note->getTextColor(); ?>;
}
</style>
<form action="action.php" method="POST" id="noteform">
<textarea name="content" id="note_content" rows="10" class="form-control text-body"><?php echo $note->getText(); ?></textarea>
<input type="hidden" name="noteid" value="<?php echo $note->getID(); ?>" />

@ -44,5 +44,5 @@ var easymde = new EasyMDE({
});
var autosaveTimer = setInterval(function () {
$("#noteform").submit();
//$("#noteform").submit();
}, 10 * 1000);
Loading…
Cancel
Save