Skip Navigation

[Resolved] JS-Editor code highlighting and autocompletion

This support ticket is created 6 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Beda 6 years, 7 months ago.

Assisted by: Beda.

Author
Posts
#651934

It would be nice to have code highlighting and autocompletion in the JS-Editor.

#652098

I am quite sure in our JS editors Syntax highlighting is provided already, by Codemirror, the same as we use for the HTML and CSS part.

Autocompletion is not an option as far I know, with that library.
I will ask the Developers, and if it's possible we will add this.

But I suspect it's not.

#652507
Screen Shot 2018-04-12 at 15.19.07.png

My JS-Editor looks like plain text (see screenshot). What can I do to get syntax highlighting?

#652527
In Views Editor.png
Any JS.png

Seems some other plugin is interfering.
Did you try this with no other plugin and a native WordPress Theme?

Please let me know what Plugin or Theme causes the issue if any.
As well, if it's a paid Software, a link to a Downloadable copy of it, in ZIP format, could help replicate the issue.
This sounds rather like a compatibility issue, not a feature that should be added (the highlighted part)

This sample code produces what you see in the ScreenShot:

var pi = 3.14;
var person = "John Doe";
var answer = 'Yes I am!';

document.getElementById("demo").innerHTML =
pi + "<br>" + person + "<br>" + answer;

Please let me know if you find a Plugin causing this.
If not, please add a copy of your site:
https://toolset.com/faq/provide-supporters-copy-site/

That will help me to replicate this and provide the solution.