Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

textarea-markdown

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textarea-markdown - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

12

lib/textarea-markdown.js

@@ -11,5 +11,5 @@ 'use strict';

var _marked = require('marked');
var _markdownIt = require('markdown-it');
var _marked2 = _interopRequireDefault(_marked);
var _markdownIt2 = _interopRequireDefault(_markdownIt);

@@ -102,3 +102,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

this.previews.forEach(function (preview) {
preview.innerHTML = (0, _marked2.default)(_this3.textarea.value, { breaks: true });
var md = new _markdownIt2.default({
html: true,
breaks: true,
langPrefix: true,
linkify: true
});
preview.innerHTML = md.render(_this3.textarea.value);
});

@@ -105,0 +111,0 @@ }

{
"name": "textarea-markdown",
"version": "1.0.0",
"version": "1.1.0",
"description": "Make textarea a markdown editor.",

@@ -18,3 +18,3 @@ "main": "lib/textarea-markdown.js",

"dependencies": {
"marked": "^0.3.6",
"markdown-it": "^8.4.0",
"whatwg-fetch": "^2.0.3"

@@ -21,0 +21,0 @@ },

import 'whatwg-fetch'
import marked from 'marked'
import MarkdownIt from 'markdown-it'

@@ -61,3 +61,9 @@ export default class TextareaMarkdown {

this.previews.forEach((preview) => {
preview.innerHTML = marked(this.textarea.value, { breaks: true });
let md = new MarkdownIt({
html: true,
breaks: true,
langPrefix: true,
linkify: true
});
preview.innerHTML = md.render(this.textarea.value);
})

@@ -64,0 +70,0 @@ }

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc