Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone library version of nomnoml #17

Closed
korroz opened this issue May 27, 2015 · 6 comments
Closed

Standalone library version of nomnoml #17

korroz opened this issue May 27, 2015 · 6 comments

Comments

@korroz
Copy link
Contributor

korroz commented May 27, 2015

It would be handy if nomnoml could come in a standalone javascript version for embedding on pages where you would want to render nomnoml diagrams.

For example something like this:

<script src="nomnoml.js"></script>
<script id="noml" type="text/plain">
    [nomnoml]is->[awesome]
</script>
<canvas id="target-canvas"></canvas>
<script>
    var canvas = document.getElementById('target-canvas');
    var noml = document.getElementById('noml').innerHTML;
    nomnoml.draw(canvas, noml);
</script>

On a sidenote, I've started this work and have a working build of a standalone nomnoml.js already.

@ctzurcanu
Copy link

+1 I would also propose a Markdown extension since MD also consumes text and generates html5

@exsilium
Copy link

👍 I could use this as well, currently I basically stripped down the app itself and included the canvas portion to my page, but a proper library would be nice.

@korroz
Copy link
Contributor Author

korroz commented May 27, 2015

Glad to see there is interest!

And as long as nomnoml works standalone it should be easy to make a markdown extension for it. My sights were on this target in fact, or in particular on integrating nomnoml into StackEdit.

Progress is good, although a slight detour down the path of upgrading Dagre (the layout library) to the latest version has seemingly led me into a dead-end. In any case, reducing dependencies and making nomnoml more portable has resulted in rather extensive refactoring. So I'm not sure how likely @skanaar will accept my eventual pull request.

@ctzurcanu
Copy link

@korroz I am also working on our own in-house StackEdit-like tech.

@korroz korroz mentioned this issue May 30, 2015
@korroz korroz closed this as completed Jun 7, 2015
@skanaar
Copy link
Owner

skanaar commented Jun 7, 2015

Wohoo 🎉 Very happy to say that this is now a reality 😄
Thank to @korroz for hard work

@korroz
Copy link
Contributor Author

korroz commented Jun 7, 2015

@skanaar I'm just as happy!

Thanks for accepting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants