pattern-lab / plugin-node-tab

ARCHIVED - The Tab plugin allows you to define additional code tabs to the pattern viewer / modal.
http://patternlab.io/
MIT License
5 stars 9 forks source link

Support prism syntax highlighting #5

Open bmuenzenmeyer opened 8 years ago

bmuenzenmeyer commented 8 years ago

I'd expect this to work from within the plugin:

PrismLanguages.add({'<<type>>': '<<type>>'});

especially in the case of css which comes standard with prism.

Despite this - i get the following (unhighlighted) output:

image

bmuenzenmeyer commented 7 years ago

https://github.com/pattern-lab/styleguidekit-assets-default/issues/14

AxelHo commented 7 years ago

is there any solution for this problem. Need syntax highlightning for css and sass. prismedContent = Prism.highlight(this.responseText, Prism.languages['html']); seems to me that everything is highlighted as html

bmuenzenmeyer commented 7 years ago

I documented my efforts so far above. I would like to get back to figuring this out but it is not a current priority. Hoping someone else can take the reigns on it.

jefarrell commented 6 years ago

@simonpioli I'm trying to implement this - was there any reason you stopped where you did? Did you have it working? It would be such a nice feature to have

simonpioli commented 6 years ago

I only managed to get it working by manually concatenating the languages I wanted from Prism into our styleguidekit before using them so the solution ended up being external to this project.

I haven't got round to porting it back to this repo and refactoring it to use the config.

thomasbruketta commented 6 years ago

@simonpioli can you send a link to that repo for reference? Or perhaps post of gist of the changes?

simonpioli commented 6 years ago

@thomasbruketta Unfortunately the repos are in work's private BitBucket account. I'll have to take a look through and make sure there's no API keys etc before I stick them on here.