This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #218 from ckeditor/t/200c
Fix: Column insertion and cell merging buttons should work correctly when the editor content is right–to–left (RTL). Closes #200.
- Loading branch information
Showing
5 changed files
with
148 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<style> | ||
body { | ||
font-family: Helvetica, Arial, sans-serif; | ||
font-size: 14px; | ||
} | ||
</style> | ||
|
||
<div id="editor"> | ||
<figure class="table"> | ||
<table> | ||
<tbody> | ||
<tr> | ||
<td>1</td> | ||
<td>2</td> | ||
<td>3</td> | ||
</tr> | ||
<tr> | ||
<td>4</td> | ||
<td>5</td> | ||
<td>6</td> | ||
</tr> | ||
<tr> | ||
<td>7</td> | ||
<td>8</td> | ||
<td>9</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</figure> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
|
||
/* globals console, window, document */ | ||
|
||
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; | ||
import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset'; | ||
|
||
ClassicEditor | ||
.create( document.querySelector( '#editor' ), { | ||
plugins: [ ArticlePluginSet ], | ||
language: { | ||
ui: 'en', | ||
content: 'ar' | ||
}, | ||
toolbar: [ | ||
'heading', '|', 'insertTable', '|', 'bold', 'italic', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' | ||
], | ||
table: { | ||
contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells' ], | ||
tableToolbar: [ 'bold', 'italic' ] | ||
} | ||
} ) | ||
.then( editor => { | ||
window.editor = editor; | ||
} ) | ||
.catch( err => { | ||
console.error( err.stack ); | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Tables and RTL (right–to–left) content | ||
|
||
The editor has English UI and Arabic content. In Arabic, the table is mirrored so some features of the editor must work differently to provide the right UX. | ||
|
||
## Adding columns | ||
|
||
1. Focus the "5" cell. | ||
2. Using the toolbar menu, add column to the right. | ||
3. The column should visually appear on the right–hand side of the "5" cell. | ||
4. Focus the "5" cell. | ||
5. Using the toolbar menu, add column to the left. | ||
3. The column should visually appear on the left–hand side of the "5" cell. | ||
|
||
## Merging cells | ||
|
||
1. Focus the "5" cell. | ||
2. Using the toolbar menu, merge cell to the right. | ||
3. "5" and "4" cells should be merged. | ||
4. Focus the "5" cell. | ||
5. Using the toolbar menu, merge cell to the left. | ||
6. "5" and "6" cells should be merged. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters