CKEditor配置不';t将文本更改为从右向左

CKEditor配置不';t将文本更改为从右向左,ckeditor,right-to-left,question2answer,Ckeditor,Right To Left,Question2answer,我已将config.js编辑为 CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: config.language = 'ar'; config.contentsLangDirection = 'rtl'; contentsLanguage:'ar'; config.dialog_buttonsO

我已将config.js编辑为

CKEDITOR.editorConfig = function( config )
{
    // Define changes to default configuration here. For example:
    config.language = 'ar';
    config.contentsLangDirection = 'rtl';
    contentsLanguage:'ar';
    config.dialog_buttonsOrder = 'rtl';
};

但我仍然让编辑在我的问答平台中从左到右。我还应该怎么做才能使我的编辑器从右向左?

下面的HTML和脚本对我来说很有用,而不是使用全局配置文件作为应用程序,我使用了内联配置,如下所示-

HTML

<textarea id="editor" name="editor1">&lt;p&gt;Initial value.&lt;/p&gt;</textarea>
CKEDITOR.replace('editor');

感谢您的回复。我应该把这个代码放在标题里吗?我将如何使用此代码?请解释。您可以在页面底部包含此脚本。确保在标记中或在此脚本块之前添加对ckeditor.js脚本文件的引用。如何在中包含ckeditor.js?请在这里写下相关的行。这个问题可能是因为插件在默认情况下没有这个代码。我知道了!我在中显式地添加了配置,它成功了。谢谢:)
<script type="text/javascript">
        CKEDITOR.on('dialogDefinition', function (ev) {
            // Take the dialog name and its definition from the event data.
            var dialogName = ev.data.name;
            var dialogDefinition = ev.data.definition;
            // Check if the definition is from the dialog we're
            // interested in (the 'image' dialog).
            if (dialogName == 'image') {
                // Get a reference to the 'Image Info' tab.
                var infoTab = dialogDefinition.getContents('info');
                // Remove unnecessary widgets/elements from the 'Image Info' tab.
                infoTab.remove('browse');
                infoTab.remove('txtHSpace');
                infoTab.remove('txtVSpace');
                infoTab.remove('txtBorder');
                infoTab.remove('txtAlt');
                infoTab.remove('txtWidth');
                infoTab.remove('txtHeight');
                infoTab.remove('htmlPreview');
                infoTab.remove('cmbAlign');
                infoTab.remove('ratioLock');
            }
        });
        CKEDITOR.config.contentsLangDirection = 'rtl';
        CKEDITOR.replace('editor');
    </script>