WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 4 months ago

#40972 closed defect (bug) (fixed)

TinyMCE editor in Text widget does not have RTL contents

Reported by: sa3idho Owned by: 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 5 months ago.
40972.0.diff (533 bytes) - added by westonruter 5 months ago.
widget-text.png (22.6 KB) - added by sa3idho 5 months ago.

Download all attachments as: .zip

Change History (15)

@sa3idho
5 months ago

#1 @westonruter
5 months 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
5 months 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
5 months ago

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

#4 @ocean90
5 months ago

#41016 was marked as a duplicate.

#5 @guytzhak
5 months ago

The solution is:

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

@westonruter
5 months ago

#6 follow-ups: @westonruter
5 months 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
5 months ago

#7 in reply to: ↑ 6 @sa3idho
5 months ago

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

@guytzhak please test 40972.0.diff.

@azaozz is this the right approach?

#8 @westonruter
5 months ago

  • Keywords commit added

#9 in reply to: ↑ 6 @azaozz
5 months 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
5 months 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
5 months ago

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

Reopen for 4.8.1.

#12 @westonruter
4 months 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.