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

lilium-text

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

lilium-text - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

48

build/liliumtext.js

@@ -44,6 +44,17 @@ "use strict";

el.addEventListener('click', function (ev) {
el.addEventListener('mousedown', function (ev) {
ev.preventDefault();
ev.stopPropagation();
return false;
});
el.addEventListener('mouseup', function (ev) {
ev.preventDefault();
ev.stopPropagation();
editor.log('Executed command ' + _this.webName + (_this.param ? " with parameter '" + _this.param + "'" : ''));
editor.fire('command', _this.webName);
_this.execute(ev, _this, editor);
return false;
});

@@ -75,2 +86,15 @@

_createClass(LiliumTextWebCommand, [{
key: "highlightNode",
value: function highlightNode(node) {
var selection = this.editor.restoreSelection();
var range = document.createRange();
this.editor.log("Highlighting node " + node.nodeName + " from Web Command");
range.selectNode(node);
selection.removeAllRanges();
selection.addRange(range);
this.editor.storeRange(range);
}
}, {
key: "executeText",

@@ -144,2 +168,4 @@ value: function executeText() {

selection.getRangeAt(0).insertNode(newElem);
this.highlightNode(newElem);
} else if (!leftExistWrap != !rightExistWrap) {

@@ -898,11 +924,15 @@ // Apparently there is no XOR in Javascript, so here's a syntax monstrosity

key: "storeRange",
value: function storeRange() {
var tempSelection = window.getSelection();
value: function storeRange(maybeRange) {
if (maybeRange) {
this._tempRange = maybeRange;
} else {
var tempSelection = window.getSelection();
if (tempSelection.type == "None" || !tempSelection.focusNode) {
var range = document.createRange();
range.setStart(this.contentel, 0);
this._tempRange = range;
} else {
this._tempRange = tempSelection.getRangeAt(0).cloneRange();
if (tempSelection.type == "None" || !tempSelection.focusNode) {
var range = document.createRange();
range.setStart(this.contentel, 0);
this._tempRange = range;
} else {
this._tempRange = tempSelection.getRangeAt(0).cloneRange();
}
}

@@ -909,0 +939,0 @@

2

package.json
{
"name": "lilium-text",
"version": "0.2.2",
"version": "0.2.3",
"description": "Web rich text editor. Ready to be used in a test environment.",

@@ -5,0 +5,0 @@ "main": "build/liliumtext.js",

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