Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Syntax Highlighting when editing Themes and Components
#44
// lineWrapping : true,
in the editor config

PHP Code:
footer.php
   
var editor CodeMirror.fromTextArea(textarea, { 


you might also be able to do it in your own js code after codemirror is initialized of course

Code:
// psuedo code
myeditor = $('#codetext').next('.CodeMirror').get(0).CodeMirror;
myeditor.setOption('lineWrapping',true);    
myeditor.refresh();

i tried this in 3.4 and it works, for example
$(".code_edit").next(".CodeMirror").get(0).CodeMirror.setOption('lineWrapping',true)

of course for components you have to wrap this in a .each since there will be mutiple matches etc.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply


Messages In This Thread
RE: Syntax Highlighting when editing Themes and Components - by shawn_a - 2015-01-28, 04:50:16



Users browsing this thread: 1 Guest(s)