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

Expose editor instance in the editable DOM elements #1838

Closed
Reinmar opened this issue Jun 27, 2019 · 1 comment · Fixed by ckeditor/ckeditor5-core#184
Closed

Expose editor instance in the editable DOM elements #1838

Reinmar opened this issue Jun 27, 2019 · 1 comment · Fixed by ckeditor/ckeditor5-core#184
Assignees
Labels
type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Milestone

Comments

@Reinmar
Copy link
Member

Reinmar commented Jun 27, 2019

Some integrations or external addons need to be able to access the editor instance which controls a specific DOM editable element. E.g. the CKEditor 5 inspector could benefit from that – you'd be able to run it by clicking the editable element you want to inspect.

@Reinmar Reinmar added pending:feedback This issue is blocked by necessary feedback. status:confirmed type:feature This issue reports a feature request (an idea for a new functionality or a missing option). labels Jun 27, 2019
@Reinmar Reinmar removed the pending:feedback This issue is blocked by necessary feedback. label Jun 27, 2019
@Reinmar Reinmar added this to the iteration 25 milestone Jun 27, 2019
@Reinmar
Copy link
Member Author

Reinmar commented Jun 27, 2019

It'd be also cool to have it somewhere in this property docs how to do the following:

const ckeditorInstance = domEditableElement.ckeditorInstance;

ckeditorInstance.editing.view.change( writer => {
        const viewEditableElement = ckeditorInstance.editing.view.domConverter.mapDomToView( domEditableElement );

        writer.setAttribute( 'spellcheck', 'false', viewEditableElement );
} );

jodator added a commit to ckeditor/ckeditor5-ui that referenced this issue Jun 28, 2019
Docs: Used the new `EditorUI#setEditableElement()` API in the custom editor guides (see ckeditor/ckeditor5#1838).
jodator added a commit to ckeditor/ckeditor5-core that referenced this issue Jun 28, 2019
Feature: Added an editor instance reference to the native editable DOM element under the `ckeditorInstance` property. Closes ckeditor/ckeditor5#1838. 

Implemented the `EditorUI#setEditableElement()` method. 
Deprecated the `EditorUI#_editableElements` property.
jodator added a commit to ckeditor/ckeditor5-editor-balloon that referenced this issue Jun 28, 2019
Internal: Used the new `EditorUI#setEditableElement()` API in the `BalloonEditorUI` class (see ckeditor/ckeditor5#1838).
jodator added a commit to ckeditor/ckeditor5-editor-classic that referenced this issue Jun 28, 2019
Internal: Used the new `EditorUI#setEditableElement()` API in the `ClassicEditorUI` class (see ckeditor/ckeditor5#1838).
jodator added a commit to ckeditor/ckeditor5-editor-decoupled that referenced this issue Jun 28, 2019
Internal: Used the new `EditorUI#setEditableElement()` API in the `DecoupledEditorUI` class (see ckeditor/ckeditor5#1838).
jodator added a commit to ckeditor/ckeditor5-editor-inline that referenced this issue Jun 28, 2019
Internal: Used the new `EditorUI#setEditableElement()` API in the `InlineEditorUI` class (see ckeditor/ckeditor5#1838).
jodator added a commit that referenced this issue Jun 28, 2019
Docs: Used the new `EditorUI#setEditableElement()` API in the custom editor guides (see #1838).
mlewand pushed a commit that referenced this issue May 1, 2020
Internal: Fixed stylelint errors related to colors and indentation (see ckeditor/ckeditor5-dev#611).
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
2 participants