FCKeditor阿拉伯语不出来

问题描述 投票:1回答:1

我正在其中一个项目中使用FCKeditor。

<textarea name="Content_Arabic" id="Content_Arabic" cols="35" rows="4" class="txtfield"><?php echo (stripslashes(stripslashes($_POST['Content'])));?></textarea>
<script type="text/javascript">
    var editor = new ew_DHTMLEditor("Content_Arabic");

    editor.create = function() {
        var sBasePath = 'FCKeditor/';
        var oFCKeditor = new FCKeditor('Content_Arabic', '100%', 350, 'Default');
        oFCKeditor.BasePath = sBasePath;
        oFCKeditor.ReplaceTextarea();
        oFCKeditor.rtl;
         oFCKeditor.ContentLangDirection='rtl';
        this.active = true;
    }
    ew_DHTMLEditors[ew_DHTMLEditors.length] = editor;

    ew_CreateEditor();  // Create DHTML editor(s)

    //-->
</script>

此加载的编辑器仍然是英语风格。

我希望它从右到左以阿拉伯语言样式加载。

php jquery fckeditor
1个回答
1
投票

下面的解决方案假定您要针对解决方案中FCKEditor的所有实例静态地进行此配置*。

仅编辑文件/path/to/your_fckeditor_installation_dir/fckeditor.js,并如下更改以下属性:

FCKConfig.AutoDetectLanguage    = false ;
FCKConfig.DefaultLanguage       = 'ar' ;

编辑

从上面的代码中,您只需要执行以下几行(删除其余部分):

var oFCKeditor = new FCKeditor('Content_Arabic', '100%', 350, 'Default');
oFCKeditor.BasePath = 'FCKeditor/';
oFCKeditor.ReplaceTextarea();

仅此而已!

*如果您希望此内容动态更改,那么您应该按照these准则更改方法

© www.soinside.com 2019 - 2024. All rights reserved.