GithubHelp home page GithubHelp logo

nullartist / node-red-contrib-drawsvg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bartbutenaers/node-red-contrib-drawsvg

0.0 0.0 0.0 53.42 MB

A Node-RED node to host a local DrawSvg service

License: Apache License 2.0

HTML 45.78% JavaScript 54.22%

node-red-contrib-drawsvg's Introduction

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

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

node-red-contrib-drawsvg's People

Contributors

bartbutenaers avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.