bwx Posted October 28, 2015 Posted October 28, 2015 How to add more programming languages to the code editor? 4.1
Nathan Explosion Posted October 28, 2015 Posted October 28, 2015 26 minutes ago, bwx said: How to add more programming languages to the code editor? IPS 4.0 or 4.1?
Matk Posted October 28, 2015 Posted October 28, 2015 58 minutes ago, Nathan Explosion said: IPS 4.0 or 4.1? I wanna add .lua I using 4.1 ;p
Nathan Explosion Posted October 28, 2015 Posted October 28, 2015 There you go - much more information now provided as a result of my question
bwx Posted October 28, 2015 Author Posted October 28, 2015 I've uploaded CodeMirror with more languages but it fails to load...
Nathan Explosion Posted October 28, 2015 Posted October 28, 2015 1 minute ago, bwx said: I've uploaded CodeMirror with more languages but it fails to load... It requires a little bit more than just uploading the languages, by the looks of it. I'll play around and see what I can come up with.
bwx Posted October 28, 2015 Author Posted October 28, 2015 Yeah I've been digging into the templates and additional JS code, it seems they build more languages to be available, but when I added them to the CodeMirror build the entire code editor is broken, but it doesn't look like the CodeMirror was modified by IPS itself and I've been using the same exact version 5.8.1... why is it always have to be so hard :P
Nathan Explosion Posted October 28, 2015 Posted October 28, 2015 Yeah, I'm not going to dig too deep in to this I think - would be delving in to the IPS side of things a bit more than I'm comfortable with. IPS - could you maybe provide a guide on how we can use the http://codemirror.net/doc/compress.html page to integrate other languages in with the defaults you've used?
bwx Posted October 28, 2015 Author Posted October 28, 2015 Everything about the code editor is hardcoded, available languages, default selected language, height of the dialog... hate this!
Mark Posted October 29, 2015 Posted October 29, 2015 https://community.invisionpower.com/4guides/editor-and-emoticons/adding-code-languages-r97/
Nathan Explosion Posted October 29, 2015 Posted October 29, 2015 47 minutes ago, Mark said: https://community.invisionpower.com/4guides/editor-and-emoticons/adding-code-languages-r97/ Thanks - but I don't believe that completes things as the code dialog box doesn't list the additional languages, as far as I can see. Scratch that - all good now, browser was playing silly buggers with the clearing of the cache and not doing it fully. Thanks Mark....exactly the same steps as I was doing yesterday....damn browser throwing off the scent. A note to all readers: Mark makes a very important point in step 4 - you need to make sure you keep codemirror.js (very first entry in the list) selected. If I remember correctly, yesterday when I was going through the above the result was a spinning circle on the code prompt and it would never finish loading. If you see that behaviour then you didn't select codemirror.js so repeat step 4 onwards again.
darkdreamingdan Posted June 18, 2017 Posted June 18, 2017 Does anyone still have a copy of this guide? We've been using it all this time to add Lua but now seems to be taken offline
Surpac Posted September 14, 2017 Posted September 14, 2017 We are trying to add TCL language to codebox as well. Anyone has any clue on where to find the correct documentation? Or how to do this?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.