mediaLinkInsertInterceptor property

FutureOr<bool> Function(String, InsertFileType)? mediaLinkInsertInterceptor
final

Allows you to intercept any image/video/audio inserted as a link into the editor. The function passes the URL of the media inserted.

Return a bool to tell the plugin if it should continue with its own handler or if you want to handle the image/video 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, InsertFileType)? mediaLinkInsertInterceptor;