Methods
addCSSToBody() → {Promise.<void>}
Adds CSS files to the head of the current document.
- Source
Returns:
- Type:
- Promise.<void>
addCell() → {void}
Calls a Julia function to add a new cell, updates the cell IDs table, and displays a toast message.
- Source
Returns:
- Type:
- void
addModalButtonListener() → {void}
Adds event listeners to the open and close buttons of the settings modal.
- Source
Returns:
- Type:
- void
callJuliaFunction(func_name, options) → {Promise.<any>}
Calls a Julia function via WebSocket and returns a Promise that resolves with the return value of the function. Callbacks can be provided to handle responses.
Parameters:
Name | Type | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
func_name | string | - | |||||||||||||||||||||||||
options | Object | -Properties
|
- Source
Returns:
- Type:
- Promise.<any>
closeSettings() → {void}
Adds the `hidden` class to the settings modal and removes the `flex` class to hide it.
- Source
Returns:
- Type:
- void
error(message) → {void}
Logs an error message to the console with a specific prefix.
Parameters:
Name | Type | Description |
---|---|---|
message | string | - |
- Source
Returns:
- Type:
- void
error(message) → {void}
Logs an error message to the console with the PlutoBoard.jl prefix
Parameters:
Name | Type | Description |
---|---|---|
message | string | The error message to be logged |
Returns:
- Type:
- void
findCell(cell_id) → {void}
Finds a cell by its ID, highlights it, and displays a toast message.
Parameters:
Name | Type | Description |
---|---|---|
cell_id | string | - |
- Source
Returns:
- Type:
- void
info(message) → {void}
Logs an informational message to the console with a specific prefix.
Parameters:
Name | Type | Description |
---|---|---|
message | string | - |
- Source
Returns:
- Type:
- void
info(message) → {void}
Logs an informational message to the console with the PlutoBoard.jl prefix
Parameters:
Name | Type | Description |
---|---|---|
message | string | The message to be logged |
Returns:
- Type:
- void
insertHTMLToBody() → {Promise.<void>}
Inserts the HTML document created by the user into the body and head of the current document.
- Source
Returns:
- Type:
- Promise.<void>
insertSettingsHTMLToBody() → {Promise.<void>}
Inserts the settings HTML document into the body of the current document.
- Source
Returns:
- Type:
- Promise.<void>
openSettings() → {void}
Removes the `hidden` class from the settings modal and adds the `flex` class to display it.
- Source
Returns:
- Type:
- void
placeAlliFrames() → {void}
Places all iFrames needed by the user in index.html.
Returns:
- Type:
- void
placeAlliFrames() → {void}
Places all iFrames needed given the user's index.html file.
- Source
Returns:
- Type:
- void
placeIframe(targetCellID, destinationDiv) → {void}
Places an iframe into the specified destination div and hides all cells except the one with the given targetCellID. Also hides all Pluto elements.
Parameters:
Name | Type | Description |
---|---|---|
targetCellID | string | - |
destinationDiv | HTMLElement | - |
Returns:
- Type:
- void
placeIframe(targetCellID, destinationDiv) → {void}
Places an iframe in a specific destination div and hides every cell except the one with the given targetCellID.
Parameters:
Name | Type | Description |
---|---|---|
targetCellID | string | - |
destinationDiv | HTMLElement | - |
- Source
Returns:
- Type:
- void
removeCell(cell_id) → {void}
Calls a Julia function to remove a cell by its ID, updates the cell IDs table, and displays a toast message.
Parameters:
Name | Type | Description |
---|---|---|
cell_id | string | - |
- Source
Returns:
- Type:
- void
resizePlutoNav() → {void}
Hides the Pluto navigation bar by setting its parent element's minimum height to zero.
- Source
Returns:
- Type:
- void
setIFrames() → {void}
Places all iFrames in the document once the main export is loaded.
Returns:
- Type:
- void
setupWebsocket() → {WebSocket}
Sets up a WebSocket connection to PlutoBoard.jl
- Source
Returns:
- Type:
- WebSocket
updateAllCells() → {Promise.<void>}
Updates all cells in the Pluto notebook.
- Source
Returns:
- Type:
- Promise.<void>
updateCell(cellID) → {Promise.<void>}
Updates cell in a Pluto notebook by its ID
Parameters:
Name | Type | Description |
---|---|---|
cellID | string | - |
- Source
Returns:
- Type:
- Promise.<void>
(async) updateCell(cellID) → {Promise.<void>}
Updates a specific cell in the Pluto notebook by its ID.
Parameters:
Name | Type | Description |
---|---|---|
cellID | string | - |
- Source
Returns:
- Type:
- Promise.<void>
updateCellByReactiveVariableAttribute(rv) → {Promise.<void>}
Updates all cells containing a specific reactive variable in their `rv` attribute
Parameters:
Name | Type | Description |
---|---|---|
rv | string | - |
- Source
Returns:
- Type:
- Promise.<void>
updateCellByVariable(varName) → {Promise.<void>}
Updates all cells that contain a specific variable. Must be the the actual variable. `variable` will not work if the cell contains `user_package.variable`.
Parameters:
Name | Type | Description |
---|---|---|
varName | string | - |
- Source
Returns:
- Type:
- Promise.<void>
updateCellIDsTable() → {void}
Fetches the list of cell IDs from Julia and updates the cell IDs table in the settings modal.
- Source
Returns:
- Type:
- void
updateCellsByID(cellIDs) → {Promise.<void>}
Updates multiple cells in a Pluto notebook by their IDs
Parameters:
Name | Type | Description |
---|---|---|
cellIDs | Array.<string> | - |
- Source
Returns:
- Type:
- Promise.<void>
updateCellsByReactiveVariable(rv) → {Promise.<void>}
Updates all cells containing a specific reactive variable in their innerHTML
Parameters:
Name | Type | Description |
---|---|---|
rv | string | - |
- Source
Returns:
- Type:
- Promise.<void>
waitForOpenConnection(socket) → {Promise.<void>}
Waits for the WebSocket connection to be open
Parameters:
Name | Type | Description |
---|---|---|
socket | WebSocket | - |
- Source
Returns:
- Type:
- Promise.<void>
warn(message) → {void}
Logs a warning message to the console with a specific prefix.
Parameters:
Name | Type | Description |
---|---|---|
message | string | - |
- Source
Returns:
- Type:
- void
warn(message) → {void}
Logs a warning message to the console with the PlutoBoard.jl prefix
Parameters:
Name | Type | Description |
---|---|---|
message | string | The warning message to be logged |
Returns:
- Type:
- void