Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support lang attribute #670

Closed
wwalc opened this issue Nov 17, 2017 · 1 comment
Closed

Support lang attribute #670

wwalc opened this issue Nov 17, 2017 · 1 comment
Labels
type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Milestone

Comments

@wwalc
Copy link
Member

wwalc commented Nov 17, 2017

🐞 Is this a bug report or feature request? (choose one)

  • Feature request

💻 Version of CKEditor

1.0.0-alpha.2

📋 Steps to reproduce

It's impossible to use Classic Editor in systems where the input language in the editor is different than the language used by the CMS (e.g. in any systems where the content is translatable).

✅ Expected result

There should be a simple way to instruct Classic Editor to add lang attribute that will apply to the entered content. This is especially important, because otherwise the browser spellchecker is using the wrong language.

❎ Actual result

In case of Inline/Balloon editor this is plain simple as I can set the attributes on the editable element, in case of Classic Editor this is a bit more cumbersome:

    ClassicEditor
        .create( document.querySelector( '#editor' ) )
        .then( editor => {
            editor.ui.view.editable.element.setAttribute('lang', 'de');
        } )
        .catch( error => {
            console.error( error );
        } );

📃 Other details that might be useful

Note: the inner content of the editor may have nothing to do with the interface language of the editor.

@wwalc wwalc added the type:improvement This issue reports a possible enhancement of an existing feature. label Nov 17, 2017
@Reinmar Reinmar added status:confirmed type:feature This issue reports a feature request (an idea for a new functionality or a missing option). and removed type:improvement This issue reports a possible enhancement of an existing feature. labels Nov 17, 2017
@Reinmar Reinmar added this to the backlog milestone Oct 15, 2018
@oleq
Copy link
Member

oleq commented Aug 13, 2019

Since #1151, you can set config.language.content that will change the lang attribute of the content (all editors).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

No branches or pull requests

3 participants