sn-minimal-markdown-editor
Advanced tools
Comparing version 1.0.13 to 1.0.14
@@ -70,3 +70,4 @@ module.exports = function(grunt) { | ||
'node_modules/sn-components-api/dist/dist.js', | ||
'vendor/modes/markdown/markdown.js' | ||
'vendor/modes/markdown/markdown.js', | ||
'vendor/mark-selection.js' | ||
], | ||
@@ -73,0 +74,0 @@ dest: 'dist/lib.js', |
{ | ||
"name": "sn-minimal-markdown-editor", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "", | ||
"main": "dist/dist.js", | ||
"author": "Standard Notes <hello@standardnotes.org>", | ||
"dependencies": { | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"codemirror": "^5.31.0", | ||
"sn-components-api": "^1.0.16", | ||
"sn-components-api": "^1.0.242", | ||
"babel-cli": "^6.18.0", | ||
@@ -13,0 +12,0 @@ "babel-preset-env": "^1.1.1", |
document.addEventListener("DOMContentLoaded", function(event) { | ||
var componentManager; | ||
var workingNote, clientData, lastValue; | ||
var workingNote, clientData; | ||
var lastValue, lastUUID; | ||
var editor; | ||
@@ -30,2 +31,9 @@ var ignoreTextChange = false; | ||
function onReceivedNote(note) { | ||
if(note.uuid !== lastUUID) { | ||
// Note changed, reset last values | ||
lastValue = null; | ||
initialLoad = true; | ||
lastUUID = note.uuid; | ||
} | ||
workingNote = note; | ||
@@ -57,3 +65,4 @@ | ||
mode: "markdown", | ||
lineWrapping: true | ||
lineWrapping: true, | ||
styleSelectedText: true | ||
}); | ||
@@ -60,0 +69,0 @@ editor.setSize("100%", "100%"); |
Sorry, the diff of this file is too big to display
462557
10
11261