jsInitBuilder property

String Function(String js)? jsInitBuilder
final

Used to build custom JavaScript code for initialising Summernote editor.

Should return a String containing valid JavaScript code.

It provides the default implementation, to allow developers to prepend/append custom code.

Example of appending custom code:

HtmlEditorField(
  jsInitBuilder: (js) => [
    js,
    "console.log('Hello from JS!');",
  ].join(),
)

Keep in mind that the summernote editor is in jQuery.ready() function. For building the Js code you can use JsBuilder.

Implementation

final String Function(String js)? jsInitBuilder;