Members
-
constant formatBytes
-
Formats a byte size into a human-readable string.
-
constant isImage
-
Checks if a file is an image based on its type.
-
constant isSizeValid
-
Checks if the size of a file is valid based on the maximum size.
-
constant isTypeValidExtension
-
Checks if the type of a file is valid based on the accepted types.
-
constant orientationMap
-
Orientation map to limit dragging to horizontal or vertical.
-
constant selectionController
-
Unique symbol for marking roots
Methods
-
toggleClass(className, el, val)
-
Helper function to toggle element
Parameters:
Name Type Description className
el
val
Events
-
syntax-highlight
-
Fired when the content is being processed and before it is rendered. Provides an opportunity to highlight code blocks based on the programming language used. This is also known as syntax highlighting. One example would be to use a prebuilt syntax highlighting library, e.g with highlightjs.
Parameters:
Name Type Description code
string lang
string Returns:
string