0

任何人都有与 ckeditor 一起使用的 URDU 语言 JS 库?我可以付钱给他,我非常需要那个图书馆。我使用了这个库http://ckeditor.com/forums/Plugins/Urdu-input,它在 Mozilla 中工作,但在 chrome 中不起作用,在 chrome 中它显示字符但不显示单词。

4

1 回答 1

0

而不是添加不同的语言插件,其中单词不同或可能是错误的。您可以只使用系统键盘语言,并在 CKEditor 中根据语言使用内容方向(即 contentsLangDirection)。我这样做如下:

$(function(){
    $("#Language_secondary").change(function(){
        resetCKEditorAccordingToLanguage(CKEDITOR.instances.editor4, this.value)
    });
});

function resetCKEditorAccordingToLanguage(ckeditorObj, Language_secondary){
    switch(Language_secondary){
        case 'ARABIAN':
        case 'URDU':
            ckeditorObj.config.contentsLangDirection = 'rtl';
            break;
        default :
            ckeditorObj.config.contentsLangDirection = 'ltr';
            break;
        }
    }
}
于 2017-07-03T09:53:45.033 回答