Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 459
Nawaf Alsulami Avatar asked Feb 01 '26 01:02

Nawaf Alsulami


1 Answers

With dart:js :

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

context can be seen as an alias for js window.

like image 65
Alexandre Ardhuin Avatar answered Feb 03 '26 15:02

Alexandre Ardhuin