Accessory

Developer
Supported

ThEEditor

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Visible

     

You must be logged in to post.

Code correction

Bug Report

alamode
alamode

First off, great accessory. I noticed I kept getting errors when I would toggle smartIndent on or off. Looking at the error led me to the following:

on line 123 of acc.theeditorcodemirror.php file you need to add a single quote.

As is:

$this->sections['Tabs'"<label title='Configures whether to use the context-sensitive indentation that the mode provides or just indent the same as the line before.'>".
    
"<input type='checkbox' name='ThEEditorCodeMirror-use-smartIndent' onclick='enableCodeMirror_smartIndent(this); ".($this->use_smartIndent "checked='checked'" "")."'/>&nbsp;Enable smartIndent".
    
"</label><br/>"

Needs:

$this->sections['Tabs'"<label title='Configures whether to use the context-sensitive indentation that the mode provides or just indent the same as the line before.'>".
    
"<input type='checkbox' name='ThEEditorCodeMirror-use-smartIndent' onclick='enableCodeMirror_smartIndent(this);' ".($this->use_smartIndent "checked='checked'" "")."'/>&nbsp;Enable smartIndent".
    
"</label><br/>"


The onClick event wasn’t getting closed causing an ‘unexpected }’ error.

onclick='enableCodeMirror_smartIndent(this);' 

Adding that single stopped all of my errors.

Just thought I would throw this out there.

Thanks again,
Brian