Disable double click selection for SyntaxHighlighter

Syntax Highlighter has a feature that allows you to double-click the code. How do I disable this feature?

+3


source to share


2 answers


You need to set the parameter quick-code

to false.

// Disable double click feature
SyntaxHighlighter.defaults['quick-code'] = false;

// Initialize SyntaxHighlighter
SyntaxHighlighter.all();

      



Tested in version 3.0.83.

+4


source


Here are the relevant lines in the source code. I'm still confused about what the default key is quick-code

, but the parameter being referenced is quickCode

. I think this has to do with using it opts-parser

https://github.com/syntaxhighlighter/opts-parser .

https://github.com/syntaxhighlighter/syntaxhighlighter/blob/b35cee8468e87eaac6e303f0115c02626d1bef0f/src/defaults.js#L33



https://github.com/syntaxhighlighter/syntaxhighlighter/blob/b35cee8468e87eaac6e303f0115c02626d1bef0f/src/core.js#L152

0


source







All Articles