You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@equinor/fusion-wc-markdown

Package Overview
Dependencies
Maintainers
4
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/fusion-wc-markdown - npm Package Compare versions

Comparing version

to
0.3.2

10

lib/custom-elements.json

@@ -306,3 +306,3 @@ {

],
"description": "this should actually only be handle on blur\nthrottle incase some one two-way binds this component\ncache the current markdown, to compare with incoming values\n\n// TODO this value might need to be increased"
"description": "handle change event"
},

@@ -320,10 +320,2 @@ {

],
"events": [
{
"name": "input",
"type": {
"text": "CustomEvent"
}
}
],
"attributes": [

@@ -330,0 +322,0 @@ {

18

lib/markdown-editor/element.js

@@ -28,3 +28,3 @@ import { __awaiter, __decorate } from "tslib";

* const md = '#my heading';
* <fwc-markdown-editor value="md" change={console.log} onInput={(e)=>{console.log(e)}}></fwc-markdown-editor>
* <fwc-markdown-editor value="md" onInput={(e)=>{console.log(e)}}></fwc-markdown-editor>
* ```

@@ -166,12 +166,12 @@ *

if (tr.docChanged) {
this.dispatchEvent(new CustomEvent('input', { detail: tr }));
this.handleChange(tr);
console.log('handleTransaction', tr);
const { markdown } = this;
this._value = markdown;
// add new mardownEvent
const inputEvent = new CustomEvent('markdownEvent', { detail: this });
this.dispatchEvent(inputEvent);
}
}
/**
* this should actually only be handle on blur
* throttle incase some one two-way binds this component
* cache the current markdown, to compare with incoming values
*
* // TODO this value might need to be increased
* handle change event
*/

@@ -181,4 +181,2 @@ handleChange(_tr) {

this._value = markdown;
const event = new CustomEvent('change', { detail: markdown });
this.dispatchEvent(event);
}

@@ -185,0 +183,0 @@ setMinHeight() {

@@ -20,3 +20,3 @@ import { LitElement, PropertyValues, TemplateResult } from 'lit';

* const md = '#my heading';
* <fwc-markdown-editor value="md" change={console.log} onInput={(e)=>{console.log(e)}}></fwc-markdown-editor>
* <fwc-markdown-editor value="md" onInput={(e)=>{console.log(e)}}></fwc-markdown-editor>
* ```

@@ -77,7 +77,3 @@ *

/**
* this should actually only be handle on blur
* throttle incase some one two-way binds this component
* cache the current markdown, to compare with incoming values
*
* // TODO this value might need to be increased
* handle change event
*/

@@ -84,0 +80,0 @@ protected handleChange(_tr: Transaction): void;

{
"name": "@equinor/fusion-wc-markdown",
"version": "0.3.1",
"version": "0.3.2",
"description": "Markdown editor created from ProseMirror markdown",

@@ -60,3 +60,3 @@ "main": "lib/index.js",

},
"gitHead": "28f2f2611bf2e2794aa1a24ee25f9feb5dd8dd5f"
"gitHead": "95fc07f1b1fdf985340e070f9b0abea82cba4fe6"
}

Sorry, the diff of this file is not supported yet