MyBB Community Forums
How do I configure MyBB with Ace Editor - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: MyCodes (https://community.mybb.com/forum-117.html)
+--- Thread: How do I configure MyBB with Ace Editor (/thread-232427.html)



How do I configure MyBB with Ace Editor - anwarjut87 - 2021-05-19

I have myBB installed
I am the only one who has access to the forums
I enabled HTML
JS and CSS are not allowed, I used MyCode
JS and CSS are working using MyCode (as far as I've tested)
I'm trying to include Ace Editor into posts/threads, which isn't working.
I'm trying the following specifically:


[style]  #editor {height:500px; width:500px; font-size:50px;} [/style]

<div id="editor">function foo(items) {
    var x = "All this is syntax highlighted";
    return x;
}</div>

[javascript="/src-min/ace.js"]
[javascript] var editor = ace.edit("editor"); editor.setTheme("ace/theme/monokai"); editor.session.setMode("ace/mode/javascript");[/javascript]