diff --git a/projects/angular-editor-app/src/app/app.component.ts b/projects/angular-editor-app/src/app/app.component.ts index 71a20d0c..40aebaa5 100644 --- a/projects/angular-editor-app/src/app/app.component.ts +++ b/projects/angular-editor-app/src/app/app.component.ts @@ -50,7 +50,8 @@ export class AppComponent implements OnInit { ], toolbarHiddenButtons: [ ['bold', 'italic'], - ] + ], + textDirection: 'auto' }; config2: AngularEditorConfig = { diff --git a/projects/angular-editor/src/lib/config.ts b/projects/angular-editor/src/lib/config.ts index b6d23ac7..2f442ce8 100644 --- a/projects/angular-editor/src/lib/config.ts +++ b/projects/angular-editor/src/lib/config.ts @@ -38,6 +38,7 @@ export interface AngularEditorConfig { outline?: boolean; toolbarHiddenButtons?: string[][]; rawPaste?: boolean; + textDirection?: 'ltr' | 'rtl' | 'auto'; } export const angularEditorConfig: AngularEditorConfig = { diff --git a/projects/angular-editor/src/lib/editor/angular-editor.component.html b/projects/angular-editor/src/lib/editor/angular-editor.component.html index de32bb92..a2fd10f6 100644 --- a/projects/angular-editor/src/lib/editor/angular-editor.component.html +++ b/projects/angular-editor/src/lib/editor/angular-editor.component.html @@ -38,6 +38,7 @@ [attr.tabindex]="disabled ? -1 : tabIndex" [attr.translate]="config.translate" [attr.spellcheck]="config.spellcheck" + [attr.dir]="config.textDirection" [style.height]="config.height" [style.minHeight]="config.minHeight" [style.maxHeight]="config.maxHeight"