Skip to content

Commit

Permalink
Merge pull request #744 from City-of-Helsinki/UHF-X_ckeditor_language…
Browse files Browse the repository at this point in the history
…_selector

UHF-X Ckeditor language selector
  • Loading branch information
khalima authored Apr 12, 2024
2 parents b57b267 + 8fb3521 commit cb3a7b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ export default class HelfiLanguageSelectorEditing extends Plugin {
model: {
key: 'helfiLanguageSelector',
value: (viewElement) => {
const languageCode = viewElement.getAttribute('lang');
const textDirection = viewElement.getAttribute('dir');
return stringifyLanguageAttribute(languageCode, textDirection);
const languageCode = viewElement.getAttribute('lang') ?? '';
const textDirection = viewElement.getAttribute('dir') ?? '';
return stringifyLanguageAttribute(languageCode.toLowerCase(), textDirection.toLowerCase());
}
},
view: {
Expand Down

0 comments on commit cb3a7b8

Please sign in to comment.