dataCallback function should contain editor instance name info:
While dataCallback usage on top of plugin's level it's hard to understand which editor instance it belongs to. As result it's not able to have 2+ editors with different autocomplete models on the same page.
@DmitrySmolsky that's some early adopter feedback, thanks! 馃檪
Back to the topic, it makes sense. But instead of passing the editor alone, I'd prefer passing Autocomplete instance that was related to that callback.
Having Autocomplete instance you can always access Editor from it's property (autocomplete.editor) - and you'll have access to any other props.
@mlewand, good suggestion.
Autocomplete instance will be ok as well.
Thx
@jacekbogdanski let's do our best to include this change in initial 4.10.0 release.
All right, now the dataCallback signature looks like that:
function dataCallback( matchInfo, callback ) {
}
matchInfo contains following properties:
queryrangeautocompleteIt will be presented in a nicer way after release in our CKEditor4 API docs.
Most helpful comment
@jacekbogdanski let's do our best to include this change in initial 4.10.0 release.