linkInsertInterceptor property

(FutureOr<bool> Function(String, String, bool)?) linkInsertInterceptor
final

Allows you to intercept any links being inserted into the editor. The function passes the display text, the URL itself, and whether the URL should open a new tab.

Return a bool to tell the plugin if it should continue with its own handler or if you want to handle the link by yourself. (true = continue with internal handler, false = do not use internal handler)

If no interceptor is set, the plugin uses the internal handler.

Implementation

final FutureOr<bool> Function(String, String, bool)? linkInsertInterceptor;