& nbspを利用するようにtinyMCEを設定する方法は誰にも分かりません。コンパクトなスペースの代わりに? die dbにデータを格納すると、文字エンコーディングの問題が発生します。私たちは現在、tinyMCEを使って電子メールを送信しています。これらの文字が送信されると、疑問符が多数作成されます。電子メールで使用するエンコーディングは、コンパクトスペースに対応できないためです。TinyMCEは、 の代わりにコンパクトスペース(ASCIIで160)(0xA0で0xA0)を生成します。
ご協力いただければ幸いです。
のTinyMCEはそれらなしでブラウザがただ1つのスペースを表示していましたので、保護されたスペース(U + 00A0)を挿入する必要が
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
skin : "o2k7",
plugins : "spellchecker,style,layer,table,advhr,inlinepopups,insertdatetime,print,contextmenu,fullscreen,noneditable,visualchars,xhtmlxtras,wordcount,advlist,paste,tabfocus",
// Theme options
theme_advanced_buttons1 : "newdocument,spellchecker,|,print,|,styleselect,formatselect,fontselect,fontsizeselect,|,fullscreen",
theme_advanced_buttons2 : "bold,italic,underline,strikethrough,sub,sup,|,backcolor,forecolor,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,|,insertdate,inserttime,|,code,|,showmorebuttons,",
theme_advanced_buttons3 : "tablecontrols,|,insertlayer,moveforward,movebackward,absolute,|,styleprops,hr,removeformat,visualaid,|,charmap,advhr,",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
setup : function(ed) {
// Add a custom button
ed.addButton('showmorebuttons', {
title : 'Expand Advanced Toolbar',
image : '/img/email/toolbars.gif',
onclick : function() {
showMoreButtons(ed.id);
}
});
},
oninit : function(){
var tmpIdent = tinyMCE.activeEditor.id;
document.getElementById(tmpIdent + "_toolbar3").style.display = 'none';
var currentHeight = document.getElementById(tmpIdent+"_ifr").style.height;
currentHeight = currentHeight.substring(0, currentHeight.indexOf("px"));
currentHeight = (currentHeight*1)+15;
document.getElementById(tmpIdent+"_ifr").style.height=currentHeight+"px";
},
apply_source_formatting : false,
force_p_newlines : false,
remove_linebreaks : false,
forced_root_block : false,
force_br_newlines : true,
entity_encoding : "raw",
// Example content CSS (should be your site CSS)
content_css : "/tinymce/example/css/content.css",
relative_urls : false,
// Style formats
style_formats : [
{title : 'Word H1', block : 'h1', styles : {color : '#365f91', 'font-family' : 'cambria'}},
{title : 'Word H2', block : 'h2', styles : {color : '#4f81bd', 'font-family' : 'cambria'}},
{title : 'Word H3', block : 'h3', styles : {color : '#4f81bd', 'font-family' : 'cambria'}},
{title : 'Word H4', block : 'h4', styles : {color : '#4f81bd', 'font-family' : 'cambria', "font-style" : "italic"}}
]
});