2021-04-26, 08:07 PM
Hello,
+ 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:
which results in
<div id="editor">function foo(items) {
var x = "All this is syntax highlighted";
return x;
}</div>
(no Ace editor/textbox... plain text)
-----------------------------------------
note: MyCodes:
1)
Name: CSS: block
Regular Expression: \[style(.*?)\](.*?)\[/style\]
Replacement: <style$1>$2</style>
2)
Name: JavaScript: Inline
Regular Expression: \[javascript\](.*?)\[/javascript\]
Replacement: <script type="text/javascript">$1</script>
3)
Name: Javascript: External
Regular Expression: \[javascript=(.*?)\]
Replacement: <script type="text/javascript" src="$1"></script>
The MyCodes are baffling, but I think they are working anyway... I don't know why the editor isn't working.
------------------------------------------
Please note I installed/configured the editor correctly (i.e., I can access it through regular HTML page)
+ 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]
which results in
<div id="editor">function foo(items) {
var x = "All this is syntax highlighted";
return x;
}</div>
(no Ace editor/textbox... plain text)
-----------------------------------------
note: MyCodes:
1)
Name: CSS: block
Regular Expression: \[style(.*?)\](.*?)\[/style\]
Replacement: <style$1>$2</style>
2)
Name: JavaScript: Inline
Regular Expression: \[javascript\](.*?)\[/javascript\]
Replacement: <script type="text/javascript">$1</script>
3)
Name: Javascript: External
Regular Expression: \[javascript=(.*?)\]
Replacement: <script type="text/javascript" src="$1"></script>
The MyCodes are baffling, but I think they are working anyway... I don't know why the editor isn't working.
------------------------------------------
Please note I installed/configured the editor correctly (i.e., I can access it through regular HTML page)