Changeset 5396

Show
Ignore:
Timestamp:
02/25/08 03:32:10 (11 months ago)
Author:
inureyes
Message:

#806

  • html 변환을 가능하게 하는 restrictEditorMode의 자동화
Location:
trunk/plugins/FM_Modern
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/plugins/FM_Modern/editor.js

    r5395 r5396  
    8787        return; 
    8888    // 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; 
    9093    for (var x in TTModernEditor.editors) return x; // ignore if there is any other instance 
    9194    var seed = (textarea.id || 'unknown').replace(new RegExp('[^a-z0-9_]', 'gi'), ''); 
  • trunk/plugins/FM_Modern/index.php

    r5395 r5396  
    2020        $config = setting::fetchConfigVal($configVal); 
    2121    } 
    22     $config['restrictEditorMode'] = false; 
    2322    if (in_array(setting::getBlogSettingGlobal('defaultFormatter','html'),array('markdown','textile')) || 
    2423        in_array($entry['contentFormatter'],array('markdown','textile'))) { 
    25         $config['restrictEditorMode'] = true; 
    2624        $config['defaultmode'] = 'TEXTAREA'; 
    2725    } else if (!isset($config['defaultmode'])) { 
     
    3836            editor.editMode = "<?php echo $config['defaultmode'];?>"; 
    3937            editor.newLineToParagraph = <?php echo ($config['paragraphdelim'] == 'P' ? 'true' : 'false');?>; 
    40             editor.restrictEditorMode = <?php echo ($config['restrictEditorMode'] == true ? 'true' : 'false');?>; 
    4138            return editor; 
    4239<?php