alexwforsythe / code-blocks

Syntax highlighting for Google Docs
https://www.alexwforsythe.com/code-blocks/
MIT License
695 stars 88 forks source link

Allow custom styles #174

Open cliffckerr opened 3 years ago

cliffckerr commented 3 years ago

Firstly: wonderful package, I use it daily!

I was wondering if it would be possible to add "Upload style" or "Edit style" features. The highlightjs source style files are pretty simple and I think a fair proportion of users would be able to make use of this functionality (I certainly would!). I'm not a JavaScript expert but it looks like it wouldn't be too hard to append additional styles to the array, and I believe any uploaded/edited styles could be made to persist via the userProps variable. While the sky's the limit in terms of providing a nice CSS editor and validation, I don't think either of those things would be necessary in the first instance: just the ability to upload a CSS file, with a simple try-catch preventing the new style from being loaded if the user munged it up and it can't be parsed, is probably enough to still be useful.

It'd be stretching the limits of my JavaScript/apps script fluency to try to make a PR for this myself, but otherwise I would!

YawLighthouse commented 2 years ago

Or at least being able to have a custom theme so we can change certain things such as the background or the base text color would be nice...

shavatek commented 1 year ago

that would be nice. I like the VS code dark hi-contrast so much it has like 5 colors. but mine is not even formatting correctly it just cant makeup its mind on what things to color or what not to color.