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

Changeset 6314


Ignore:
Timestamp:
Apr 4, 2008, 9:46:20 PM (14 years ago)
Author:
ebihara
Message:

#333:とりあえずop:colorをテキストモードから挿入する場合は、code属性をあらかじめ指定するようにした

File:
1 edited

Legend:

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

    r6313 r6314  
    4949function pne_mce_insert_tagname(id, tagname)
    5050{
     51    var opt = "";
     52
    5153    var elm = document.getElementById(id);
    5254    var selection = new Selection(elm);
     
    5456    var pos = selection.create();
    5557
    56     var replace = "<" + tagname + ">" + elm.value.substring(pos.start, pos.end) + "</" + tagname + ">";
     58    if (tagname == "op:color") {
     59        opt = " code=\"#000000\"";
     60    }
     61
     62    var replace = "<" + tagname + opt + ">" + elm.value.substring(pos.start, pos.end) + "</" + tagname + ">";
    5763    var head = elm.value.substring(0, pos.start);
    5864    var tail = elm.value.substring(pos.end, elm.value.length);
Note: See TracChangeset for help on using the changeset viewer.