【问题标题】:change language in TinyMCE在 TinyMCE 中更改语言
【发布时间】:2012-11-18 12:35:05
【问题描述】:

我想将语言“en”更改为“ur”。我从http://www.tinymce.com/i18n/index.php?ctrl=lang&act=download&pr_id=1 下载了语言文件夹,并将其三个文件夹 themes, plugins, langs 替换为 tinymce\jscripts\tiny_mce 文件夹。 然后我在示例文件夹中更改了 full.html 代码,如上所述:

<!DOCTYPE html>
<html>
<head>

<title>آپ سادہ مرکزی خیال</title>
<meta charset="utf-8" />
<!-- TinyMCE -->
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
    tinyMCE.init({
        // General options
        language : "ur",
        mode : "textareas",
        theme : "advanced",
        plugins : "advhr,advimage,advlink,emotions,fullpage,media,paste,searchreplace,style,table,template,xhtmlxtras",

除乌尔都语文本外,其他代码相同。

但我的输出没有显示工具栏、文本区域。

请告诉我我做错了什么。

【问题讨论】:

  • 看来您在更改语言方面所做的一切都是正确的。但是,您的 tinyMCE.init 脚本似乎没有结束标签。确保将 }); 放在 plugins之后
  • @1.44mb,是的,标签已关闭

标签: php javascript tinymce


【解决方案1】:

这些步骤可能对您有所帮助:

  1. 包含 jQuery 和 jquery.tinymce.js 文件。
  2. 分配你的textarea控制属性class="tinymce"
  3. 在 JavaScript 中:

    $(function(){
        $("textarea.tinymce").tinymce({
            // Location of TinyMCE script
            script_url : "js/tiny_mce/tiny_mce.js",
    
            // General options
            theme : "advanced",
            plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
    
            // Example content CSS (should be your site CSS)
            content_css : "css/style.css",
    
            // Theme options
            theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
    
    
        });
    });
    

【讨论】:

    猜你喜欢
    • 2019-09-13
    • 1970-01-01
    • 1970-01-01
    • 2011-08-30
    • 1970-01-01
    • 1970-01-01
    • 2017-07-12
    • 2021-05-08
    • 1970-01-01
    相关资源
    最近更新 更多