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

Library version #194

Open
JulianusIV opened this issue May 26, 2023 · 2 comments
Open

Library version #194

JulianusIV opened this issue May 26, 2023 · 2 comments

Comments

@JulianusIV
Copy link

Hi, is there a library of this that can be used with yew to achieve this all in an own web app?
Or alternatively could you add a license to this repo, that specifies how we are allowed to use the code found here?

@somehowchris
Copy link
Owner

Hey :)

I don't have any analytics on the site as it's really just a small thing and I didn't know people were actually using it :) I personally made it when I was doing my thesis.

Sure, a LICENSE file wouldn't hurt in general. A library on crates.io could also easily be done, could you elaborate on what you find useful about this crate? or point out which parts of this project you find useful to have in your project? also this codebase is very yew specific meaning I might have to split some stuff if you don't use yew.

In general, the highlighter itself isn't rust but JS and can be found here: https://github.com/syntaxhighlighter/syntaxhighlighter

@JulianusIV
Copy link
Author

Hey :)

I don't have any analytics on the site as it's really just a small thing and I didn't know people were actually using it :) I personally made it when I was doing my thesis.

Sure, a LICENSE file wouldn't hurt in general. A library on crates.io could also easily be done, could you elaborate on what you find useful about this crate? or point out which parts of this project you find useful to have in your project? also this codebase is very yew specific meaning I might have to split some stuff if you don't use yew.

In general, the highlighter itself isn't rust but JS and can be found here: https://github.com/syntaxhighlighter/syntaxhighlighter

Sorry for responding so late i forgot to watch my github yesterday

The reason i wanted something like this (a changeable codeblock basically) is for a personal project of mine that needs codeblocks, however the highlighting sadly breaks when i only execute the js script after creating the codeblock component once i change the code, due to the generated child notes for the style not being deleted on a redraw by yew.
I looked for stuff that already did that to see if i can understand how its done or even just find a lib that exposes such a codeblock component, so i dont have to rewrite the entire dom manipulation that the script does in rust myself, and your project was pretty much exactly what i need.

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

2 participants