Changeset 5396
- Timestamp:
- 02/25/08 03:32:10 (11 months ago)
- Location:
- trunk/plugins/FM_Modern
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/FM_Modern/editor.js
r5395 r5396 87 87 return; 88 88 // Set editor mode for formatters. 89 if(this.formatter == 'textile' || this.formatter == 'markdown') this.editMode = 'TEXTAREA'; 89 if(this.formatter == 'textile' || this.formatter == 'markdown') { 90 this.editMode = 'TEXTAREA'; 91 this.restrictEditorMode = true; 92 } else this.restrictEditorMode = false; 90 93 for (var x in TTModernEditor.editors) return x; // ignore if there is any other instance 91 94 var seed = (textarea.id || 'unknown').replace(new RegExp('[^a-z0-9_]', 'gi'), ''); -
trunk/plugins/FM_Modern/index.php
r5395 r5396 20 20 $config = setting::fetchConfigVal($configVal); 21 21 } 22 $config['restrictEditorMode'] = false;23 22 if (in_array(setting::getBlogSettingGlobal('defaultFormatter','html'),array('markdown','textile')) || 24 23 in_array($entry['contentFormatter'],array('markdown','textile'))) { 25 $config['restrictEditorMode'] = true;26 24 $config['defaultmode'] = 'TEXTAREA'; 27 25 } else if (!isset($config['defaultmode'])) { … … 38 36 editor.editMode = "<?php echo $config['defaultmode'];?>"; 39 37 editor.newLineToParagraph = <?php echo ($config['paragraphdelim'] == 'P' ? 'true' : 'false');?>; 40 editor.restrictEditorMode = <?php echo ($config['restrictEditorMode'] == true ? 'true' : 'false');?>;41 38 return editor; 42 39 <?php
