Ace editor syntax highlighting not working. Why is the cssClass undefined? -


I get the following error in the inspector

  Unkit type error: undefined ace.js The property 'cssClass' can not be read: 15750  

setTheme and setMode are in the same directory as ACE. Js

Here is the HTML markup:

  & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Meta http-equiv = "X-UA-Compatible" content = "IE = Edge" & gt; & Lt; Title & gt; Ace Place & lt; / Title & gt; & Lt; Style type = "text / css" media = "screen" & gt; #editor {status: complete; Top: 0; Correct: 0; Bottom: 0; Left: 0; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; Hello world! & Lt; Div id = "editor" & gt; & Lt; / Div & gt; & Lt; Script src = "bower_components / ace / build / src / ace.js" type = "text / javascript" charset = "utf-8" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Var Editor = ace.edit ("Editor"); Editor.setTheme ("bower_components / ace / creation / src / monokai"); Editor.getSession () setMode ("bower_components / ace / creation / src / html"). & Lt; / Script & gt; & Lt; / Body & gt; & Lt; / Html & gt;    

"bower_components / ace / build / src / monocame" Usage

  editor.setTheme ("Ace / Theme / Monocay"); Editor.session.setMode ("ace / mode / html"); Instead,  

This will work because Ace has a special mapping for the path starting from "ace" .


Comments