Skip to content

The enableAutoSerachIn/disableAutoSerachIn options could also consider children of a given elements #5

@f1ames

Description

@f1ames

Type of report

Feature request

Provide description of the new feature

There are enableAutoSerachIn / disableAutoSerachIn options for configuring elements on which WProofreader should/shouldn't be initialized. It works fine, however one downside is that only given elements are considered in auto search and not its children.

The case we had is the page with few instances of CKEditor 4 and requirement to initialize WProofreader only on one of them. From what I see, to correctly initialize WProofreader on CKEditor 4 (the classic one using iframe) selector pointing to an iframe element should be passed (and not any parent wrappers):

image

the challenge here is that CKEditor doesn't mark iframe element with any unique class/id and so the class/id needs to be added explicitly, for example:

CKEDITOR.replace( 'editor1', {
	on: {
		instanceReady: function( evt ) {
			evt.editor.container.findOne( 'iframe' ).addClass( 'cke_wproofreader' );
		}
	}
} );

It will be useful if one can just pass the class/id of the editor top wrapper (e.g. #cke_editor1 in the above case) and it will simply work.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions