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 6
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 #155 from ckeditor/t/134
Fix: Keyboard navigation should work inside to-do lists in RTL content (see ckeditor/ckeditor5-list#134).
- Loading branch information
Showing
5 changed files
with
213 additions
and
51 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,24 @@ | ||
<div id="editor"> | ||
<p>مرحبا</p> | ||
<ul> | ||
<li><input type="checkbox">مرحبا</li> | ||
<li><input type="checkbox" checked="checked">مرحبا</li> | ||
<li><input type="checkbox">مرحبا</li> | ||
<li><input type="checkbox" checked="checked">مرحبا</li> | ||
<li><input type="checkbox">مرحبا</li> | ||
<li><input type="checkbox">مرحبا</li> | ||
<li><input type="checkbox" checked="checked">مرحبا</li> | ||
<li><input type="checkbox">مرحبا</li> | ||
</ul> | ||
<p>مرحبا.</p> | ||
<p>مرحبا</p> | ||
<ol> | ||
<li>مرحبا</li> | ||
</ol> | ||
<ul> | ||
<li><input type="checkbox">مرحبا</li> | ||
</ul> | ||
<ul> | ||
<li>مرحبا</li> | ||
</ul> | ||
</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,41 @@ | ||
/** | ||
* @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 Enter from '@ckeditor/ckeditor5-enter/src/enter'; | ||
import Typing from '@ckeditor/ckeditor5-typing/src/typing'; | ||
import Heading from '@ckeditor/ckeditor5-heading/src/heading'; | ||
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold'; | ||
import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight'; | ||
import Table from '@ckeditor/ckeditor5-table/src/table'; | ||
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph'; | ||
import Undo from '@ckeditor/ckeditor5-undo/src/undo'; | ||
import Clipboard from '@ckeditor/ckeditor5-clipboard/src/clipboard'; | ||
import List from '../../src/list'; | ||
import TodoList from '../../src/todolist'; | ||
|
||
ClassicEditor | ||
.create( document.querySelector( '#editor' ), { | ||
plugins: [ Enter, Typing, Heading, Highlight, Table, Bold, Paragraph, Undo, List, TodoList, Clipboard ], | ||
language: 'ar', | ||
toolbar: [ | ||
'heading', '|', 'bulletedList', 'numberedList', 'todoList', '|', 'bold', 'highlight', 'insertTable', '|', 'undo', 'redo' | ||
], | ||
table: { | ||
contentToolbar: [ | ||
'tableColumn', | ||
'tableRow', | ||
'mergeTableCells' | ||
] | ||
} | ||
} ) | ||
.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,19 @@ | ||
## To–do list and RTL (right–to–left content) | ||
|
||
### UI | ||
|
||
1. Make sure the list is displayed correctly. | ||
1. Check boxes should be on the left side of the text. | ||
2. There should be some space between the text and the check mark. | ||
3. List should be indented from the right side. | ||
|
||
### Keyboard navigation | ||
|
||
1. Put a selection at the beginning of the document. | ||
2. Use the **right arrow** key to navigate forwards. | ||
3. Go through the to–do list. | ||
4. The navigation should | ||
* be uninterrupted, | ||
* go always forward. | ||
5. Reach the end of the document. | ||
6. Go backwards using the **left arrow** key and repeat the entire scenario. |
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