joomla-developer-docs icon indicating copy to clipboard operation
joomla-developer-docs copied to clipboard

Syntax highlighting for code snippets

Open eddieajau opened this issue 12 years ago • 6 comments

I need someone to work out how to get syntax highlighting within fenced code blocks.

See http://eddieajau.github.io/joomla-developer-docs/#/en/cms/platform/form/field-accesslevel.md

Ideally the XML should be highlighted.

eddieajau avatar Nov 25 '13 21:11 eddieajau

May be highlight.js?

b2z avatar Nov 29 '13 08:11 b2z

Well I was trying to implement highlight.js, but... It's working on my test page, but does not here. I tried the original implementation, tried to wrap it to timeout, but still nothing. May be someone can look on it? What I am missing?

b2z avatar Dec 11 '13 07:12 b2z

Try this maybe? http://ngmodules.org/modules/angular-highlightjs

wilsonge avatar Dec 11 '13 12:12 wilsonge

Thanks. Still no luck :( Did as described there, but it's not working :(

b2z avatar Dec 11 '13 19:12 b2z

Looks not like my IDE but the code is highlighted, when I view it with Firefox and Chromium. edit: Sry, it's not, focus was on your test page ;( my mouse retired today, damn keyboard using. But maybe it's not working because on your test page the code is not generated with js like on the other one?

vess avatar Dec 11 '13 19:12 vess

Dunno... May be I've incorrectly included angular-highlightjs or may be there is another issue. I was not working with the Angular earlier, so it's hard to me to solve it :)

b2z avatar Dec 11 '13 19:12 b2z