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

Issue

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.

Solution

With dart:js :

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

context can be seen as an alias for js window.

Answered By – Alexandre Ardhuin

Answer Checked By – Robin (FlutterFixes Admin)

Leave a Reply

Your email address will not be published.