CK编辑器中的文字方向

Xul*_*fee 5 bidi ckeditor right-to-left

如何在加载编辑器上设置文本方向[rtl].

在这方面,任何人都可以帮助我.

Pek*_*ica 14

根据文档,这应该这样做:

CKEDITOR.config.contentsLangDirection 在CKSource手册中

从那里取的例子:

config.contentsLangDirection = 'rtl';
Run Code Online (Sandbox Code Playgroud)


小智 8

另一种方法是直接从您的视图文件中,使用replace()方法的好处是您可以为每个视图使用不同的方向和样式.

CKEDITOR.replace( 'article_area', {
    contentsLangDirection: 'rtl'
} );
Run Code Online (Sandbox Code Playgroud)

通过使用replace(),您还可以执行其他过滤操作,例如允许/禁止标记以及从编辑器中删除按钮.详细说明访问:

http://ckeditor.com/ckeditor_4.1rc/samples/datafiltering.html