Trouble embedding Custom Syntax Highlighter for my projects “language” in my project

Skip to first unread message


Apr 8, 2021, 5:56:10 AMApr 8
to Cloud9 Editor (Ace)

I’m creating a language highlighter for my project’s “language” that I have yet to create the regex for and I’m at the in proof of concept stage.

I have it preliminarily working in the local /tool/mode_creator.html  where I figured out how to create the demo data to load and the 


and the 


but, now I want to see it running in my project.  I read that I need to embed it I need to use src-min-noconflict/ace.js

var editor = ace.edit("editor");


But my problem is that it’s trying to load  ./src-min-noconflict/mode-mylanguage.js

A variation of the mylanguage_highlight_rules,js where they look minified and altered.

define(function(require, exports, module)

I understand the need for encapsulation to avoid conflicts, but do I have to manually create the encapsulated version?  

I thought maybe this command might generate it 

node tmlanguage.js  ../lib/ace/mode/mylanguage.js

But it yields -> 

TypeError: Cannot read property 'onMatch' of undefined

Which I’ve spent time hunting for definition of what I'm missing and can’t figure out what I’m doing wrong.

It’s so simple a monkey could do it, sadly, I’m not a monkey.  If I figure it out, I’ll post the answer, otherwise, maybe can’t use this… it looks like a powerful tool.

I hate asking for help.  Appreciate your time

Reply all
Reply to author
0 new messages