-
Notifications
You must be signed in to change notification settings - Fork 15
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
use jscreole natively on node #11
Comments
Sorry to be a bit proactive here, but I wanted to move and add jscreole to my project, and didn't really wanted to be importing js files directly. ... so ... I just created a fork and added the package.json required to make it work, I hope you don't mind (btw, let me know how/when do you want me to pass the ownership of this npm package to you). You can see it at https://www.npmjs.com/package/jscreole (I think the formatting issue on that page is because you used Wiki for the readme (https://github.com/codeholic/jscreole/blob/master/README.pod) instead of the expected markdown :) This means that jscreole can now be used directly by using I will send a PR with the changes next |
See #12 |
Honestly, I have no clue. I'm mostly a Ruby on Rails developer now 😊
Sure, there is (though it's not implemented yet). This library is almost 7 years old. DOM was considered funky at that time 😉 There has been a proposal to implement pluggable builders #10 If you just want to get a string, you can do it somehow along these lines. (It is a port of this library to PHP.) I'd be more than happy to accept your pull request. (But please instrument it with some tests.) |
Hi, we use jscreole on our app to parse the Wiki into HTML, and on the new version, we need to do the parsing on the server (vs the client), and jscreole would be the perfect api (since we already use it and have written wiki text that parses ok with it).
So my first question is: 'Is there an easy way to run jscreole on node?'
I noticed that there isn't an npm package for jscreole (which would make that easier), if you want I'm happy to help in making that happen (https://www.npmjs.com/package/jscreole is waiting for you :) )
Here is how I was able to get it to work:
That uses jsdom to create an temp div (to hold the parsing text. I also had to temporarily polute the
global
variable with a reference todocument
because jscrole looks for that global object.On that topic another question is "Is there a way to render the wiki text without an active dom?"
The text was updated successfully, but these errors were encountered: