2

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';
};

しかし、私の Question2Answer プラットフォームでは、エディターは左から右に配置されます。エディタを右から左にするには、他に何をすればよいですか?

4

1 に答える 1

2

アプリケーションのグローバル構成ファイルを使用する代わりに、以下のようにインライン構成を使用する代わりに、次の HTML とスクリプトが機能しました -

HTML

<textarea id="editor" name="editor1">&lt;p&gt;Initial value.&lt;/p&gt;</textarea>

脚本

<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>
于 2013-12-24T14:12:29.573 に答える