Message Boards Message Boards

For the Javascript notebook-embedder does anyone have method examples?

Posted 4 years ago

For the Javascript notebook-embedder does anyone have method examples?

Using Javascript notebook embedding from the github https://github.com/WolframResearch/wolfram-notebook-embedder I would like to see working examples of the following methods of the class WolframNotebookEmbedder.embed

(At the end of the list I have shown the methods that I have got working.)

abortEvaluation: t=> {…}
addEventListener: ƒ (t,e)
clearSelectionUponKeyboardDismissal: t=> {…}
closeGroup: t=> {…}
copyData: t=> {…}
cutData: t=> {…}
detach: ƒ detach()
evaluateCell: t=> {…}
evaluateElements: t=> {…}
evaluateExpression: t=> {…}
evaluateSelection: t=> {…}
getCellContent: t=> {…}
getCellRenderingMethod: t=> {…}
getCells: t=> {…}
getDimensions: t=> {…}
getDynamicModuleVariable: t=> {…}
getElementParent: t=> {…}
getElementUUID: t=> {…}
getElements: t=> {…}
getFunctionTemplates: t=> {…}
getLastGeneratedCell: t=> {…}
getOption: t=> {…}
getScrollPosition: t=> {…}
getSelection: t=> {…}
getUndoState: t=> {…}
insertAutocompletion: t=> {…}
insertCellAtCursor: t=> {…}
insertCellBefore: t=> {…}
insertFunctionTemplate: t=> {…}
isEvaluatable: t=> {…}
moveSelection: t=> {…}
moveSelectionDirections: t=> {…}
openGroup: t=> {…}
pasteData: t=> {…}
redo: t=> {…}
removeCell: t=> {…}
removeEventListener: ƒ (t,e)
selectElements: t=> {…}
selectSeparatorAfterElement: t=> {…}
selectSeparatorBeforeElement: t=> {…}
setAttributes: ƒ setAttributes(attrs)
setCellContent: t=> {…}
setDynamicModuleVariable: t=> {…}
setOptions: t=> {…}
setScrollPosition: t=> {…}
undo: t=> {…}


"I have got the flowing ones working:"

myNoteBook.getDimensions() 
{
   "width": 500,
   "height": 282
}

myNoteBook.getElements() 
{
   "elements": [
      {
         "type": "group",
         "id": "c5"
      }
   ],
   "isClosed": false,
   "visibleElementIndex": null
}

myNoteBook.getScrollPosition() 
{
   "left": 0,
   "top": 0
}

myNoteBook.getSelection() 
{
   "elements": [],
   "inCell": null,
   "cursorPosition": null,
   "separator": {
      "cellBefore": null,
      "cellAfter": {
         "cellId": "c6"
      }
   }
}

myNoteBook.getCells() 
{
   "cells": [
      {
         "type": "cell",
         "id": "c6"
      },
      {
         "type": "cell",
         "id": "c10"
      },
      {
         "type": "cell",
         "id": "c15"
      },
      {
         "type": "cell",
         "id": "c19"
      }
   ]
}

myNoteBook.setDynamicModuleVariable({cellId:"c19", name:"x$$", value:0.8}) 
{}



POSTED BY: Jeremy Ellis
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract