【问题标题】:Magento greek characters as html entitiesMagento 希腊字符作为 html 实体
【发布时间】:2015-10-09 16:52:52
【问题描述】:

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

如果我写:

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

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

代替:

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

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

谢谢:)

【问题讨论】:

    标签: html magento editor wysiwyg


    【解决方案1】:

    如果我没记错的话,我记得前段时间为中文符号做过这个。我做了一些研究,它似乎仍然有效,所以我提供了我的代码。

    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

    【讨论】:

    • 谢谢,它成功了。请注意,最后还需要一个逗号 entity_encoding : "raw", //New Line
    • 是的,我必须测试,当我在这里发表评论时,我不小心删除了它。对于那个很抱歉。更新了帖子
    • 另外请记住,这将在升级时被删除,但是我认为有一种方法可以在模块中进行此修改。我不喜欢编辑核心类型文件,但也许其他开发人员可以对此有所了解。
    猜你喜欢
    • 1970-01-01
    • 2016-08-08
    • 2016-04-02
    • 2013-09-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-01
    相关资源
    最近更新 更多