SVG from web to illustrator - svg

Im looking to make a system in which a user can create simple shapes and text on the web using SVG. I'd then like to be able to save whatever they've done to a database so they can come back and edit further, and/or be able to export what they've created from the database into illustrator.
Is there one particular library or approach that would make doing this feasible?

This may send you in the right direction SVG-Edit project.
If you just need a good svg framework to write your own, svg.js has always been good to me.
Good luck.

Related

Importing Vector Asset into Android Studio

I've created a few vector assets using Vectornator. If I import those assets into Android Studio, I receive a parsing error - as shown in the attached picture.
Why do I get this parsing error and how can I create vector assets that do not create this error?
I use FIGMA/SKETCH to create SVG's.
It was a bug, so please check your android version and update to newer one.
also check out these possible error,
Internal error parsing svg file in android studio
I've solved exporting the Vectornator project to PDF and then converting the PDF to SVG (for example with this online tool)
I also had this problem using Android App and Vectornator (Being too cheap to pay for adobe illustrator and all the cloud subscription stuff that goes with it). Haven't fully solved the problem yet, but the problem lies with Vectornator's JSON code with opacity. If you remove all opacity it will work better. Another thing is that it really appears to save a bitmap and wrap it in SVG code instead of being a clean SVG code, and a lot of online resources do that. If you open the code of the image you will see in the javascript that the code isn't quite right, which is probably why it is free. Moreover, Android has not gone out of its way to make itself compatible with a program like Vectornator, but they do go out of their way to "play nice" with adobe programming. I have come up with these solutions:
Pay for and download a program like Affinity Designer for $9.99 on Ipad (1 time fee) which has a cleaner formatting capability and import it in there then turn to SVG (and fix the issues in the design as they pop up.
Use Vectornator only for art, and not for programming, and then buckle down and use Adobe Illustrator because let's face it, they have a lot of money behind them to make sure that their products "play nice with others" (Meaning they actually pay Android to provide programming to support their code).
Import a ton of code from Maven Libraries for SVG support and essentially build an in program svg to png converter that replicates what Android App does when it imports a vector, but is under your control. If you do this you will upload all your svg files directly to this mini program instead of using the Android App's Import Image and Vector directory under File New.
I was trying everything but using Adobe Illustrator, but it is a huge pain and a lot of headache. Adobe Illustrator still has minor issues, but not the huge glaring problems of Vectornator.

OpenSceneGraph Live Rendering

When using osgviewer, you specify a .osg file to view and it displays it on the screen. Is it possible to then edit this scene graph live? As in, is it possible to add a node to the scene graph and then have the viewer automatically show this addition?
It is possible to use OpenSceneGraph so that to edit scene graphs live, but you have to do it programmatically. You would have to design your own structure of a scene graph using principles of OOP. Then you can save your scene graphs using your own serializer, later read them from file and edit as you wish. For this, I recommend checking OSG numerous tutorials and books.
If your question is simply about whether you can edit sample .osg files live, then it might not be as straightforward since you need to know the structure of each scene in advance. Assuming that, as a user, you know the structure, then you can definitely introduce some changes (or tie the changes to certain keyboard events), and observe them live.
Use OSGEdit to edit it live. It loads OSG file and it provides options to edit scenegraphs and their properties
http://osgedit.sourceforge.net/

Asciidoctor navigation bar

I see that asciidoctor.org itself has a navigation (top) bar. I'm guessing that the website was written using asciidoctor source files. Either way, how do I add a navigation bar using asciidoctor?
Update
This is possibly the wrong question to ask. Perhaps the right way to go is to use awestruct, Middleman, or Jekyll. Advice/suggestions are welcome.
Yes, the source is asciidoctor, but the site is using awestruct for the structure around the content. If you're looking at doing the same kind of thing, we recommend using some other site generation tool for the structure around the content.
Of course if you really want to do this in asciidoctor, you could. You'd need to create your own theme and craft the header that way, but it isn't really recommended because it ties your output to a medium.

Connection between svg elements

Is there a way to connect 2 elements in svg to achieve a "flow chart" like diagram? I have 2 boxes, an arrow between them, and I would like that if I drag one box, the arrow stays connected to the box.
I've founded that there is a spec for this feature in SVG 1.1 but is far from being completed.
I can't find any piece of code or library that does it (and I think it isn't a rare use case), and I would like to be sure that there isn't a proven way of doing it before I start making it myself.
Thanks!
You may be interested in the Dracula Graph Library which uses Raphael and does exactly what you mean:
http://www.graphdracula.net/
Update: I haven't used jquery-svg before, but I put something small together that may get you going: http://jsfiddle.net/7vJmy/2/
It takes advantage of jquery-ui draggable, but I suspect there's a nicer way to do it using the jquery.svganim.js package that's include with the library - anyway, this is all I have time for now.
Also, if you can in the future, include things like library restrictions in the question so you can get more specific answers from the get go! :) Hope that helps.

HTML Purifier setup - having trouble allowing Rich Text, only need the security side

I'm trying to setup HTMLPurifier for my needs. I have it up and running but straight out of the box it strips all formatting. I tried delving through the documentation but that was an exercise in frustration. Is there an easy configuration option that only implements the security aspect of the program and allows through all the rich text styling, etc. I'm not exactly sure how the YUI RTE marks up its output for styling so simply going through and creating a whitelist might be quite time consuming and involve going through both the purifier documentation and the YUI documentation - all for a simple task. Anyone have any premade configurations for this sort of thing or at least a point in the right direction? Thanks.
By default HTML Purifier allows as much styling as possible that can be allowed securely. So you are probably seeing a different problem; my guess is magic quotes. You should var_dump the HTML right before it enters HTML Purifier and turn off magic quotes if there are extra backslashes.

Resources