Magento希腊字符作为html实体

时间:2015-10-09 16:52:53

标签: html magento editor wysiwyg

我正在构建一个Magento网站,WYSIWYG编辑器和希腊字符存在问题,它们显示为html实体。

如果我写:

Ευχαριστούμε

我明白了:
<p>&Epsilon;&upsilon;&chi;&alpha;&rho;&iota;&sigma;&tau;&omicron;ύ&mu;&epsilon;</p>

而不是:

<p>Ευχαριστούμε</p>

我有什么方法可以解决这个问题吗?

谢谢:)

1 个答案:

答案 0 :(得分:2)

如果我的记忆对我来说是正确的,我记得前一段时间做过中国符号。我做了一些研究,它似乎仍然有效,所以我提供了我的代码。

TinyMCE的配置文件位于:[Magentorootdir]/js/mage/adminhtml/wysiwyg/tiny_mce/setup.js并添加以下行entity_encoding : "raw",如下所示

    var settings = {
        schema : 'html5',
        entity_encoding : "raw",//New Line
        mode : (mode != undefined ? mode : 'none'),
        elements : this.id,
        theme : 'advanced',
        plugins : plugins,
        theme_advanced_buttons1 : magentoPlugins + 'magentowidget,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect',
        theme_advanced_buttons2 : 'cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,forecolor,backcolor',
        theme_advanced_buttons3 : 'tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,iespell,media,advhr,|,ltr,rtl,|,fullscreen',
        theme_advanced_buttons4 : 'insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,pagebreak',
        theme_advanced_toolbar_location : 'top',
        theme_advanced_toolbar_align : 'left',
        theme_advanced_statusbar_location : 'bottom',
        theme_advanced_resizing : true,
        convert_urls : false,
        relative_urls : false,
        content_css: this.config.content_css,
        custom_popup_css: this.config.popup_css,
        magentowidget_url: this.config.widget_window_url,
        magentoPluginsOptions: magentoPluginsOptions,
        doctype : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',

此处的文档: http://www.tinymce.com/wiki.php/Configuration:entity_encoding