Methods

addCSSToBody() → {Promise.<void>}

Adds CSS files to the head of the current document.
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.
Returns:
Type: 
void

addModalButtonListener() → {void}

Adds event listeners to the open and close buttons of the settings modal.
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:
NameTypeDescription
func_namestring-
optionsObject-
Properties
NameTypeAttributesDefaultDescription
argsArray<optional>
[]-
kwargsObject<optional>
{}-
response_callbackfunction<optional>
() => {}-
internalboolean<optional>
false-
Returns:
Type: 
Promise.<any>

closeSettings() → {void}

Adds the `hidden` class to the settings modal and removes the `flex` class to hide it.
Returns:
Type: 
void

error(message) → {void}

Logs an error message to the console with a specific prefix.
Parameters:
NameTypeDescription
messagestring-
Returns:
Type: 
void

error(message) → {void}

Logs an error message to the console with the PlutoBoard.jl prefix
Parameters:
NameTypeDescription
messagestringThe 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:
NameTypeDescription
cell_idstring-
Returns:
Type: 
void

info(message) → {void}

Logs an informational message to the console with a specific prefix.
Parameters:
NameTypeDescription
messagestring-
Returns:
Type: 
void

info(message) → {void}

Logs an informational message to the console with the PlutoBoard.jl prefix
Parameters:
NameTypeDescription
messagestringThe 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.
Returns:
Type: 
Promise.<void>

insertSettingsHTMLToBody() → {Promise.<void>}

Inserts the settings HTML document into the body of the current document.
Returns:
Type: 
Promise.<void>

openSettings() → {void}

Removes the `hidden` class from the settings modal and adds the `flex` class to display it.
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.
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:
NameTypeDescription
targetCellIDstring-
destinationDivHTMLElement-
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:
NameTypeDescription
targetCellIDstring-
destinationDivHTMLElement-
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:
NameTypeDescription
cell_idstring-
Returns:
Type: 
void

resizePlutoNav() → {void}

Hides the Pluto navigation bar by setting its parent element's minimum height to zero.
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
Returns:
Type: 
WebSocket

updateAllCells() → {Promise.<void>}

Updates all cells in the Pluto notebook.
Returns:
Type: 
Promise.<void>

updateCell(cellID) → {Promise.<void>}

Updates cell in a Pluto notebook by its ID
Parameters:
NameTypeDescription
cellIDstring-
Returns:
Type: 
Promise.<void>

(async) updateCell(cellID) → {Promise.<void>}

Updates a specific cell in the Pluto notebook by its ID.
Parameters:
NameTypeDescription
cellIDstring-
Returns:
Type: 
Promise.<void>

updateCellByReactiveVariableAttribute(rv) → {Promise.<void>}

Updates all cells containing a specific reactive variable in their `rv` attribute
Parameters:
NameTypeDescription
rvstring-
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:
NameTypeDescription
varNamestring-
Returns:
Type: 
Promise.<void>

updateCellIDsTable() → {void}

Fetches the list of cell IDs from Julia and updates the cell IDs table in the settings modal.
Returns:
Type: 
void

updateCellsByID(cellIDs) → {Promise.<void>}

Updates multiple cells in a Pluto notebook by their IDs
Parameters:
NameTypeDescription
cellIDsArray.<string>-
Returns:
Type: 
Promise.<void>

updateCellsByReactiveVariable(rv) → {Promise.<void>}

Updates all cells containing a specific reactive variable in their innerHTML
Parameters:
NameTypeDescription
rvstring-
Returns:
Type: 
Promise.<void>

waitForOpenConnection(socket) → {Promise.<void>}

Waits for the WebSocket connection to be open
Parameters:
NameTypeDescription
socketWebSocket-
Returns:
Type: 
Promise.<void>

warn(message) → {void}

Logs a warning message to the console with a specific prefix.
Parameters:
NameTypeDescription
messagestring-
Returns:
Type: 
void

warn(message) → {void}

Logs a warning message to the console with the PlutoBoard.jl prefix
Parameters:
NameTypeDescription
messagestringThe warning message to be logged
Returns:
Type: 
void