Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#40972 closed defect (bug) (fixed)

TinyMCE editor in Text widget does not have RTL contents

Reported by: sa3idho's profile sa3idho Owned by: azaozz's profile azaozz
Milestone: 4.8.1 Priority: normal
Severity: normal Version: 4.8
Component: Widgets Keywords: has-patch commit fixed-major
Focuses: Cc:

Description

The visual editor of the text widget has alignment issue in RTL languages.

Attachments (3)

widget_text.png (58.4 KB) - added by sa3idho 7 years ago.
40972.0.diff (533 bytes) - added by westonruter 7 years ago.
widget-text.png (22.6 KB) - added by sa3idho 7 years ago.

Download all attachments as: .zip

Change History (15)

@sa3idho
7 years ago

#1 @westonruter
7 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.8.1

@azaozz is this an issue with wp.editor.initialize()?

#2 follow-up: @westonruter
7 years ago

  • Summary changed from Widget text issue to TinyMCE editor in Text widget does not have RTL contents

@sa3idho to confirm, it's the contents of the editor that actually aren't displaying in RTL when they should, correct?

#3 in reply to: ↑ 2 @sa3idho
7 years ago

@westonruter Yeah that's right, it's the contents of the visual editor that actually aren't displaying in RTL.

#4 @ocean90
7 years ago

#41016 was marked as a duplicate.

#5 @guytzhak
7 years ago

The solution is:

jQuery( document ).on( 'tinymce-editor-setup', function( event, editor ) {
    
    editor.settings.directionality = 'rtl';
 
});

@westonruter
7 years ago

#6 follow-ups: @westonruter
7 years ago

  • Keywords has-patch added; needs-patch removed
  • Owner set to azaozz
  • Status changed from new to reviewing

@guytzhak please test 40972.0.diff.

@azaozz is this the right approach?

@sa3idho
7 years ago

#7 in reply to: ↑ 6 @sa3idho
7 years ago

Replying to westonruter: It is a right approach :-)

@guytzhak please test 40972.0.diff.

@azaozz is this the right approach?

#8 @westonruter
7 years ago

  • Keywords commit added

#9 in reply to: ↑ 6 @azaozz
7 years ago

Replying to westonruter:

Yep, that should work. We don't set directionality: 'ltr' when outputting the settings for the other editor, maybe better to leave that out here too.

#10 @azaozz
7 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 40927:

TinyMCE: fix directionality settings for RTL languages.

Props westonruter, sa3idho.
Fixes #40972 for trunk.

#11 @azaozz
7 years ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for 4.8.1.

#12 @westonruter
7 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 41066:

TinyMCE: fix directionality settings for RTL languages.

Merges [40927] to 4.8 branch.
Props westonruter, sa3idho.
Fixes #40972 for 4.8.1.

Note: See TracTickets for help on using tickets.