Methods
_addCssRule(cssRule)
Add a global css rule to the document.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
cssRule |
string
|
CSS rules |
_generateId() → {string}
Generate a random ID.
- Source:
Returns:
- Type:
-
string
random 10 digit ID
_getTextWidth(text, fontopt)
Calculate the width of text.
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
text |
string
|
The text of which the length should be calculated. | ||
font |
string
|
<optional> |
"500 14px 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif" | The font css that shuold be applied to the text before calculating the width. |
attach(quill)
Attaches this tool to the given Quill Editor instance.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
quill |
Quill
|
The Quill Editor instance that this tool should get added to. |
detach(quill)
Detaches this tool from the given Quill Editor instance.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
quill |
Quill
|
The Quill Editor instance that this tool should get added to. |