File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
editors/sharedComponents/TinyMceWidget Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change 4
4
useCallback ,
5
5
useEffect ,
6
6
} from 'react' ;
7
+ import { getLocale , isRtl } from '@edx/frontend-platform/i18n' ;
7
8
import { a11ycheckerCss } from 'frontend-components-tinymce-advanced-plugins' ;
8
9
import { isEmpty } from 'lodash-es' ;
9
10
import tinyMCEStyles from '../../data/constants/tinyMCEStyles' ;
@@ -248,6 +249,7 @@ export const editorConfig = ({
248
249
quickbarsInsertToolbar,
249
250
quickbarsSelectionToolbar,
250
251
} = pluginConfig ( { isLibrary, placeholder, editorType } ) ;
252
+ const isLocaleRtl = isRtl ( getLocale ( ) ) ;
251
253
252
254
return {
253
255
onInit : ( evt , editor ) => {
@@ -264,6 +266,7 @@ export const editorConfig = ({
264
266
content_style : tinyMCEStyles + a11ycheckerCss ,
265
267
min_height : minHeight ,
266
268
contextmenu : 'link table' ,
269
+ directionality : isLocaleRtl ? 'rtl' : 'ltr' ,
267
270
document_base_url : lmsEndpointUrl ,
268
271
imagetools_cors_hosts : [ removeProtocolFromUrl ( lmsEndpointUrl ) , removeProtocolFromUrl ( studioEndpointUrl ) ] ,
269
272
imagetools_toolbar : imageToolbar ,
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ jest.mock('@edx/frontend-platform/i18n', () => {
49
49
formatMessage : PropTypes . func ,
50
50
} ) ,
51
51
defineMessages : m => m ,
52
+ getLocale : ( ) => 'getLocale' ,
52
53
FormattedDate : ( ) => 'FormattedDate' ,
53
54
FormattedMessage : ( ) => 'FormattedMessage' ,
54
55
FormattedTime : ( ) => 'FormattedTime' ,
You can’t perform that action at this time.
0 commit comments