//Clears all the rendered tiles from the view.owotCtx.clearRect(0,0,owotWidth,owotHeight);
owotCtx=owot.getContext("2d");
textInput
The DOM textarea element used for writing to the owot canvas.
//Paste "hello world" at the current cursor position.textInput.value=`hello world`;
textInput=document.getElementById("textInput");
linkElm
The DOM link element used for user link clicks.
//logs to the console whether or not the link is a javascript link.linkElm.addEventListener(`click`,function(){console.log(linkParams.protocol===`javascript`);})
linkElm=elm.link_element;
link_div
The DOM link div element used to scale the linkElm to the same size as a cell within the owot canvas.
//Highlights the URL being hovered over.linkDiv.style.background=`rgba(255,255,0,0.5)`
linkDiv=elm.link_div;
colorInput, colorInputBg
The DOM color inputs to select text and cell background color.
//Generate a random color on the text color input field.constrandomColor=Math.floor(Math.random()*16777215).toString(16).toUpperCase();colorInput.jscolor.fromString(`#${randomColor}`);
A DOM div container used as a color pallet for quick access.
//Randomize all color palette colors.constcolorButtons=colorShortcuts.querySelectorAll('.color_btn');colorButtons.forEach(button=>{if(button.title!=='Random color'){constrandomColor=`#${Math.floor(Math.random()*16777215).toString(16).toUpperCase()}`;button.style.backgroundColor=randomColor;button.title=randomColor;}});