SummernoteFile class

Summernote file plugin - adds a button to the toolbar to upload any type of file. By default it can handle picture files (jpg, png, gif, wvg, webp), audio files (mp3, ogg, oga), and video files (mp4, ogv, webm) without any upload in base64. If you want to handle other files, you must upload them into a server and insert it into the editor using the onFileUpload function.

README available here

Inheritance

Constructors

SummernoteFile({int maximumFileSize = 10485760, dynamic onFileUpload(FileUpload)?, dynamic onFileLinkInsert(String)?, dynamic onFileUploadError(FileUpload?, String?, UploadError)?})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
maximumFileSize int
Set the max file size for uploads, if exceeded, onFileUploadError is called
final
onFileLinkInsert → dynamic Function(String)?
Define what to do when a file is inserted via a link. This will override the default handler so you must insert the file yourself
final
onFileUpload → dynamic Function(FileUpload)?
Define what to do when a file is uploaded. This will override the default handler so you must insert the file into the editor manually
final
onFileUploadError → dynamic Function(FileUpload?, String?, UploadError)?
Define what to do when a file fails to insert for any reason
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getHeadString() String
Provides the JS and CSS tags to be inserted inside . Only used for Web
override
getToolbarString() String
Provides the toolbar option for the plugin
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited