npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-drawsvg

v1.3.0

Published

A Node-RED node to host a local DrawSvg service

Downloads

309

Readme

node-red-contrib-drawsvg

A Node-RED node to host a local DrawSvg service.

Special thanks to Stephen McLaughlin, my partner in crime for the SVG integration in Node-RED ! Most credits for this node go to Joseph Liard, the author of DrawSvg for providing us an offline version of his SVG drawing editor!

!!! DrawSvg is free software !!!

!!! DrawSvg IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED !!!

Install

Run the following npm command in your Node-RED user directory (typically ~/.node-red):

npm install node-red-contrib-drawsvg

Support my Node-RED developments

Please buy my wife a coffee to keep her happy, while I am busy developing Node-RED stuff for you ...

Node usage

We have implemented this node to work close together with our node-red-contrib-ui-svg node:

Online cloud service

The UI SVG node allows users to draw using the online DrawSvg editor cloud service:

image

As soon as the blue button has been clicked, the cloud URL (from the Settings tabsheet) will be accessed. This will lead the user to the DrawSvg cloud service, which will display the drawing editor inside a popup window.

Offline local service

Beside that cloud service, this node-red-contrib-drawsvg node allow you to host your own DrawSvg local service:

image

As soon as the blue button has been clicked, the local URL (from the Settings tabsheet) will be accessed. This will lead the user to the DrawSvg local service (hosted by this node-red-contrib-drawsvg node), which will again display the drawing editor inside a popup window.

When your Node-RED flow editor is available e.g. at http://yourmachine:1880/, then the local DrawSvg service will be available at http://yourmachine:1880/drawsvg_local/edrawsvg.html.

Be aware that only a single node-red-contrib-drawsvg node is required!!!!

Caution: Be aware that this service uses around 65 Mbyte of your storage!

Use cases

For most users the online DrawSvg cloud service will be sufficient, but in some cases an local service will be needed:

  • For offline Node-RED installations, that have no internet connection.
  • To avoid mixed content errors, thrown by modern browsers that don't allow unsecure http content inside secure https sessions:
    • There is no error when a http URL is used for the Node-RED flow editor, and a http (or https) is used for DrawSvg:

      image

      Although the https URL for DrawSvg might result in other problems: since the DrawSvg cloud service uses a self-signed certificate, you might have to accept that certificate somehow in your favorite browser.

    • There will be an error when a https URL is used for the Node-RED flow editor, and a http is used for DrawSvg:

      image

      Summarized: In this case, you are only allowed now to use https for DrawSvg ...

    • By using a local service, the DrawSvg content will be downloaded inside the existing Node-RED http(s) connection. As a result there shouldn't appear any mixed content errors.

      image

Versions

See the DrawSvg release notes to see the new features in every release.

  • Version 1.1.0 offers DrawSvg version 7.6
  • Version 1.2.0 offers DrawSvg version 8.0
  • Version 1.3.0 offers DrawSvg version 9.5