I keep my pages' JS code in a separate .js file (ie. "properties.php" view would have a "properties.js" script file. In the JavaScript files, I have some PHP variables which I use with the JS. Something like:
var var1 = <?php echo $var1; ?>
The above doesn't trigger any syntax errors in the text editor. Sometimes I'll have PHP code that's a little longer:
var left_by_user_id = <?php
if(isset($id)){
echo $id;
}
else{
echo 0;
}
?>;
This will trigger syntax error highlighting in the editor. Is there any way to disable highlighting for anything encapsulated in PHP brackets?