The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 861 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




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: 12 Guest(s)