ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 5740


Ignore:
Timestamp:
Mar 13, 2008, 7:33:58 PM (12 years ago)
Author:
ebihara
Message:

#333:TinyMCEをh_diary_addで使えるようにした

Location:
OpenPNE/branches/work/ebihara/prj_deco_diary
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/work/ebihara/prj_deco_diary/public_html/js/pne.js

    r2849 r5740  
    77    document.write('<a href="'+url+'" target="_blank">'+urlstr+'</a>');
    88}
     9
     10function pne_toggle_mce_editor(id)
     11{
     12    tinyMCE.execCommand("mceToggleEditor", false, id);
     13
     14    if (tinyMCE.getInstanceById(id).enabled) {
     15        document.getElementById('mce_editor_buttonmenu').style.display = "none";
     16    } else {
     17        document.getElementById('mce_editor_buttonmenu').style.display = "block";
     18    }
     19}
     20
     21function pne_mce_editor_init()
     22{
     23    tinyMCE.init({
     24        mode : "textareas",
     25        theme : "advanced",
     26        editor_selector : "mceEditor_dummy_selector",
     27        plugins : "openpne",
     28        theme_advanced_toolbar_location : "top",
     29        theme_advanced_buttons1 : "openpne_b,openpne_u,openpne_s,openpne_i,openpne_large,openpne_small,openpne_color,openpne_album,openpne_e    moji_docomo,openpne_emoji_au,openpne_emoji_softbank",
     30        theme_advanced_buttons2 : "",
     31        theme_advanced_buttons3 : ""
     32    });
     33}
     34
  • OpenPNE/branches/work/ebihara/prj_deco_diary/webapp/modules/pc/templates/h_diary_add.tpl

    r4274 r5740  
    372372({/if})
    373373
    374 <textarea class="text" name="body" rows="15" cols="50" style="width:415px">({$form_val.body})</textarea>
     374({***** WYSIWYG *****})
     375<script type="text/javascript">
     376pne_mce_editor_init();
     377</script>
     378
     379<div id="mce_editor_buttonmenu"><a href="#" onclick="tinyMCE.execCommand('Bold');return false;">[Bold]</a></div>
     380<textarea id="mce_editor_textarea" class="text" name="body" rows="15" cols="50" style="width:415px">({$form_val.body})</textarea>
     381<a href="#" onclick='pne_toggle_mce_editor("mce_editor_textarea")'>モード切替</a>
     382({***** WYSIWYG *****})
    375383
    376384</div>
  • OpenPNE/branches/work/ebihara/prj_deco_diary/webapp/modules/pc/templates/inc_header.tpl

    r5092 r5740  
    1212<script type="text/javascript" src="./js/prototype.js"></script>
    1313<script type="text/javascript" src="./js/pne.js"></script>
     14<script type="text/javascript" src="./js/tiny_mce/tiny_mce.js"></script>
    1415<style type="text/css">
    1516<!--
Note: See TracChangeset for help on using the changeset viewer.