You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default the library supports images, inline HTML, iframes and YouTube videos. There's already a comment "you can add new type to support something new" but that's not true unless you change the source directly.
Idea: Provide an API that allows to add and remove media types.
This is related to #1 to split the library into modules. I think it would be nice if each media type is its own module which can be added manually. This should reduce the package size for users who want to use the library only for images.
A possible implementation may look like this:
// import Tobii from 'tobii'; // This would continue to include all typesimport{BaseasTobii}from'tobii';// This one requires you to manually register the typesimportimagefrom'tobii/types/image';importyoutubefrom'tobii/types/youtube';importmyCustomTypefrom'./my-custom-type';Tobii.registerType(image);Tobii.registerType(youtube);Tobii.registerType(myCustomType);newTobii();
By default the library supports images, inline HTML, iframes and YouTube videos. There's already a comment "you can add new type to support something new" but that's not true unless you change the source directly.
Idea: Provide an API that allows to add and remove media types.
This is related to #1 to split the library into modules. I think it would be nice if each media type is its own module which can be added manually. This should reduce the package size for users who want to use the library only for images.
A possible implementation may look like this:
Inspired by the Day.js library.
What are your thoughts on this idea? Are there better implementation ideas?
The text was updated successfully, but these errors were encountered: