-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 #13804 from ckeditor/ck/12672-remove-italic-from-t…
…extpartlanguage Other (language): TextPartLanguage doesn't style text as italic when language is set. Closes #12672. MINOR BREAKING CHANGE (language): Text with language set is no longer styled as italic. To re-enable previous behavior, add style .ck-content span[lang] { font-style: italic; } to your css.
- Loading branch information
Showing
6 changed files
with
68 additions
and
11 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
33 changes: 33 additions & 0 deletions
33
packages/ckeditor5-language/tests/manual/textpartlanguage-italic.html
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,33 @@ | ||
<style> | ||
.ck-content span[lang] { | ||
font-style: italic; | ||
} | ||
</style> | ||
|
||
<div id="editor"> | ||
<p> | ||
<strong>Language</strong> is the human ability to acquire and use complex systems of communication, | ||
and a language is any specific example of such a system. The scientific study of <strong>language</strong> | ||
is called linguistics. | ||
</p> | ||
<p> | ||
<span lang="es" dir="ltr"> | ||
<strong>Un lenguaje</strong> (del provenzal lenguatge y este del latín lingua) es un sistema de comunicación | ||
estructurado para el que existe un contexto de uso y ciertos principios combinatorios formales. Existen | ||
<strong>contextos</strong> tanto naturales como artificiales. | ||
</span> | ||
</p> | ||
<p> | ||
<span lang="ar" dir="rtl"> | ||
اللغة نسق من الإشارات والرموز، يشكل أداة من أدوات المعرفة، وتعتبر اللغة أهم <strong>وسائل</strong> التفاهم | ||
والاحتكاك بين أفراد امجتمع في <strong>جميع</strong> ميادين الحياة. وبدون اللغة يتعذر نشاط الناس المعرفي. | ||
</span> | ||
</p> | ||
<p> | ||
<span lang="fr" dir="ltr"> | ||
<strong>La langue</strong> est la capacité humaine à acquérir et à utiliser des systèmes complexes de communication, | ||
et une langue est un exemple spécifique d'un tel système. L'étude scientifique de la langue | ||
<strong>s'appelle</strong> la linguistique. | ||
</span> | ||
</p> | ||
</div> |
26 changes: 26 additions & 0 deletions
26
packages/ckeditor5-language/tests/manual/textpartlanguage-italic.js
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,26 @@ | ||
/** | ||
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
|
||
/* global document, console, window */ | ||
|
||
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; | ||
import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset'; | ||
import TextPartLanguage from '../../src/textpartlanguage'; | ||
|
||
ClassicEditor | ||
.create( document.querySelector( '#editor' ), { | ||
image: { toolbar: [ 'toggleImageCaption', 'imageTextAlternative' ] }, | ||
plugins: [ | ||
ArticlePluginSet, | ||
TextPartLanguage | ||
], | ||
toolbar: [ 'textPartLanguage', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ] | ||
} ) | ||
.then( editor => { | ||
window.editor = editor; | ||
} ) | ||
.catch( err => { | ||
console.error( err.stack ); | ||
} ); |
8 changes: 8 additions & 0 deletions
8
packages/ckeditor5-language/tests/manual/textpartlanguage-italic.md
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,8 @@ | ||
## Text part language feature - previous italic behavior. | ||
|
||
1. The data should be loaded with four paragraph. Each paragraph style with applied language should be italic. | ||
2. Put selection in each paragraph and check if language dropdown label is changing properly. | ||
3. Play with languages: | ||
* Change language of the text selection. | ||
* Put selection that spans across multiple blocks and switch languages. | ||
* Remove language from selection. |
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 was deleted.
Oops, something went wrong.