Binding jqte (JQuery Text Editor) to a div from dart

574 Views Asked by At

I need to translated the following JQuery code to Dart:

$("#writepad").jqte();

I 've tried the following but didn't succeed:

var jquery = new JsObject(context['window.jQuery("#writepad")']);
jquery.callMethod('jqte');

I'm trying this hoping that it may stop jqte from displaying dynamically generated buttons twice. Your help is highly appreciated. Thank you.

1

There are 1 best solutions below

3
On BEST ANSWER

With dart:js :

context.callMethod(r'$', ['#writepad']).callMethod('jqte');

context can be seen as an alias for js window.