Socket
Socket
Sign inDemoInstall

sn-minimal-markdown-editor

Package Overview
Dependencies
1
Maintainers
5
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.8 to 1.3.9

6

package.json
{
"name": "sn-minimal-markdown-editor",
"version": "1.3.8",
"version": "1.3.9",
"description": "A minimal Markdown editor for Standard Notes.",
"main": "dist/dist.js",
"author": "Standard Notes <hello@standardnotes.org>",
"scripts": {
"prepublish": "npm run build",
"build": "grunt"
},
"dependencies": {

@@ -8,0 +12,0 @@ "sn-codemirror-search": "1.0.0"

26

src/main.js

@@ -20,8 +20,10 @@ document.addEventListener("DOMContentLoaded", function (event) {

}
loadEditor();
// only use CodeMirror selection color if we're not on mobile.
editor.setOption("styleSelectedText", !componentRelay.isMobile);
}
});
// only use CodeMirror selection color if we're not on mobile.
editor.setOption("styleSelectedText", !componentRelay.isMobile);
componentRelay.streamContextItem((note) => {

@@ -32,3 +34,3 @@ onReceivedNote(note);

function save() {
function saveNote() {
if (workingNote) {

@@ -80,2 +82,7 @@ // Be sure to capture this object as a variable, as this.note may be reassigned in `streamContextItem`, so by the time

}
editor.setOption(
"spellcheck",
workingNote.content.spellcheck
);
}

@@ -88,3 +95,4 @@ }

lineWrapping: true,
extraKeys: { "Alt-F": "findPersistent" }
extraKeys: { "Alt-F": "findPersistent" },
inputStyle: getInputStyleForEnvironment()
});

@@ -95,8 +103,12 @@ editor.setSize(undefined, "100%");

if (ignoreTextChange) { return; }
save();
saveNote();
});
}
loadEditor();
function getInputStyleForEnvironment() {
const environment = componentRelay.environment ?? 'web';
return environment === 'mobile' ? 'textarea' : 'contenteditable';
}
loadComponentRelay();
});

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc