therealsujitk Maybe you can add these classes to the textarea
then?
highlight.js
Ki4en hljs and most other syntax highlighters on recognize code when it is inside <pre><code>
.
therealsujitk Yeah, I checked and it doesn't work with textarea. :/
- Edited
check CodeMirror out for textareas but i'm not sure if it supports CSS/LESS.
I don't understand why textareas are discussed here, but if anyone wants to see an implementation of CodeMirror in Flarum, my Scratchpad extension uses it for the scratchpad panel of the admin dashboard.
The editor isn't WYSIWYG, so no real time highlighting in the post composer is possible anyway.
clarkwinkelmann I don't understand why textareas are discussed here
Anberlin asked if it was possible to have syntax highlighting in the <textarea>
field in the admin panel under appearance.
- Edited
v1.1.3
- Fixed compatibility with Flarum v1.0.1-beta.12 (Will not show default syntax theme).
- Fixed multiple themes on a single page.
- Other bug fixes and improvements.
Updating
Use Bazaar or update manually with composer:
composer update therealsujitk/flarum-ext-hljs
Note: Make sure to clear cache after the update.
Note: Please disable and re-enable this extension after the update.
Hi there, when you are free, maybe you can use this clipboardjs to add a copy button in the code block, take your time.
Littlegolden Looks good, I'll see what I can do. Do you mind adding this as an issue on GitHub so that I don't forget? I'll add it under enhancements.
v1.2.0
- Updated dependencies and fixed security vulnerabilities.
- Added theme: Brown Paper
- Added theme: Codepen Embed
- Added theme: Color Brewer
- Added theme: Darcula
- Added theme: Dark
- Added theme: Docco
- Added theme: Dracula
Updating
Use Bazaar or update manually with composer:
composer update therealsujitk/flarum-ext-hljs
Note: Please disable and re-enable this extension after the update.
v1.3.0
- Updated highlight.js CDN to v10.2.0
- Added theme: Github Gist
- Added theme: Github
- Added theme: Gml
- Added theme: Googlecode
- Added theme: Gradient Dark
- Added theme: Gradient Light
- Added theme: Grayscale
- Added theme: Gruvbox Dark
- Added theme: Gruvbox Light
- Added theme: Hopscotch
- Added theme: Hybrid
- Added theme: Idea
- Added theme: Ir Black
- Added theme: Isbl Editor Dark
- Added theme: Isbl Editor Light
- Added theme: Kimbie Dark
- Added theme: Kimbie Light
- Added theme: Lightfair
- Added theme: Lioshi
- Added theme: Magula
- Added theme: Mono Blue
- Added theme: Monokai Sublime
- Added theme: Monokai
- Added theme: Night Owl
- Added theme: Nnfx Dark
- Added theme: Nnfx
- Added theme: Nord
- Added theme: Obsidian
- Added theme: Ocean
- Added theme: Paraiso Dark
- Added theme: Paraiso Light
- Added theme: Pojoaque
- Added theme: Purebasic
- Added theme: Qtcreator Dark
- Added theme: Qtcreator Light
- Added theme: Railscasts
- Added theme: Rainbow
- Added theme: Routeros
- Added theme: School Book
- Added theme: Shades Of Purple
- Added theme: Solarized Dark
- Added theme: Solarized Light
- Added theme: Srcery
- Added theme: Sunburst
- Added theme: Tomorrow Night Blue
- Added theme: Tomorrow Night Bright
- Added theme: Tomorrow Night Eighties
- Added theme: Tomorrow Night
- Added theme: Tomorrow
- Added theme: Vs
- Added theme: Vs 2015
- Added theme: Xcode
- Added theme: Xt 256
- Added theme: Zenburn
Updating
Use Bazaar or update manually with composer:
composer update therealsujitk/flarum-ext-hljs
Note: Please disable and re-enable this extension after the update.
therealsujitk we are waiting for an update, since 1.3.0 is not working with the latest 14 beta
therealsujitk Waiting for updates
- Edited
I'm a little busy at the moment so I won't be able to get to this anytime soon, I'll try working on this sometime during the mid of next month. @jordanjay29, could you add the Incompatible tag to this extension for the time being. Thanks!
[deleted]
therealsujitk Rather cheekily, I'll admit, but I noticed that you've started updating your other extensions. Will this one be included ?
[deleted] Yes, i'll do it soon
[deleted]
therealsujitk Thanks
v2.0.0
- Added compatibility for v0.1.0-beta.15
- Updated highlight.js CDN to v10.5.0
- Added theme: Stackoverflow Dark
- Added theme: Stackoverflow Light
- Minor improvements and bug fixes
Updating
composer update therealsujitk/flarum-ext-hljs
@luceos, sorry to ping you like this, but do you mind removing the Incompatible tag from this discussion please. Thanks.