PlopManager
Public Class
Table of Contents
Signature
class ExternalContentManager {}
Constructor
Public Constructor
Constructs a new instance of the ExternalContentManager
class
Parameters
Name | Description |
---|---|
|
|
References
Properties
editor
Public Property
Signature
editor: Editor
References
handleContent
Public Property
Signature
handleContent: (info: TLExternalContent) => Promise<void>
References
handleUrl
Public Property
Handle urls from an external source. Feeling lucky? Overwrite this at runtime to change the way this type of external content is handled.
Example
editor.this.handleUrl = myCustomMethod
Parameters
Name | Description |
---|---|
| The editor instance |
| The info object describing the external content. |
Signature
handleUrl: (
editor: Editor,
{
point,
url,
}: Extract<
TLExternalContent,
{
type: 'url'
}
>
) => Promise<void>
References
Editor, Extract, TLExternalContent, Promise
Methods
createAssetFromFile()
Public Method
Override this method to change how assets are created from files.
Parameters
Name | Description |
---|---|
|
|
|
The file to create the asset from. |
Returns
Promise<TLAsset>
References
Editor, File, Promise, TLAsset
createAssetFromUrl()
Public Method
Override me to change the way assets are created from urls.
Parameters
Name | Description |
---|---|
|
|
|
The url to create the asset from |
Returns
Promise<TLAsset>
References
createShapesForAssets()
Public Method
Parameters
Name | Description |
---|---|
|
|
|
|
|
|
Returns
Promise<void>
References
Editor, TLAsset, VecLike, Promise
handleEmbed()
Public Method
Handle embed info from an external source. Feeling lucky? Overwrite this at runtime to change the way this type of external content is handled.
Example
editor.this.handleEmbed = myCustomMethod
Parameters
Name | Description |
---|---|
|
The editor instance |
|
|
Returns
Promise<void>
References
Editor, Extract, TLExternalContent, Promise
handleFiles()
Public Method
Handle files from an external source. Feeling lucky? Overwrite this at runtime to change the way this type of external content is handled.
Example
editor.this.handleFiles = myCustomMethod
Parameters
Name | Description |
---|---|
|
The editor instance |
|
|
Returns
Promise<void>
References
Editor, Extract, TLExternalContent, Promise
handleSvgText()
Public Method
Handle svg text from an external source. Feeling lucky? Overwrite this at runtime to change the way this type of external content is handled.
Example
editor.this.handleSvgText = myCustomMethod
Parameters
Name | Description |
---|---|
|
The editor instance. |
|
|
Returns
Promise<void>
References
Editor, Extract, TLExternalContent, Promise
handleText()
Public Method
Handle plain text from an external source. Feeling lucky? Overwrite this at runtime to change the way this type of external content is handled.
Example
editor.this.handleText = myCustomMethod
Parameters
Name | Description |
---|---|
|
The editor instance |
|
|
Returns
Promise<void>
References
Editor, Extract, TLExternalContent, Promise