dinamically create text area and input

This commit is contained in:
Luis Fernando Molina committed 2019-05-14 00:21:07 +02:00
1 parent 243a9b6afe
commit 8565091bcd
2 files changed
+33 -6

No files matched your search

+31
View File
@@ -45,6 +45,35 @@ function loadAdvancedAlgosPlatform() {
/* The first thing to do here is to add the canvas where all the action is going to happen. */
let textArea = document.createElement('textarea');
textArea.id = "textArea";
textArea.spellcheck = false;
textArea.style = 'resize: none;' +
' border: none;' +
' outline: none;' +
'box-shadow: none;' +
'overflow:hidden;' +
'font-family: ' + 'Saira' + ';' +
'font-size: 12px;' +
'background-color: rgb(255, 255, 255);' +
'color:rgb(255, 255, 255);' +
'width: ' + 800 + 'px;' +
'height: ' + 600 + 'px'
let textAreaDiv = document.getElementById('textAreaDiv');
textAreaDiv.appendChild(textArea);
textAreaDiv.style = 'position:fixed; top:' + -1500 + 'px; left:' + 500 + 'px; z-index:10; '
let input = document.createElement('input');
input.id = "input";
input.spellcheck = false;
input.style = "border: none; outline: none; box-shadow: none; overflow:hidden; width: 0px; height: 0px;";
let inputDiv = document.getElementById('inputDiv');
inputDiv.appendChild(input);
let canvas = document.createElement('canvas');
canvas.id = "canvas";
@@ -64,6 +93,8 @@ function loadAdvancedAlgosPlatform() {
browserCanvas.style.top = window.canvasApp.topMargin + 'px';
loadDebugModule();
function loadDebugModule() {
+2 -6
View File
@@ -34,12 +34,8 @@
<div id="masterApp"></div>
<div id="canvasApp"></div>
<div id="textAreaDiv">
<textarea id="textArea" spellcheck="false" style="border: none; outline: none; box-shadow: none; overflow:hidden; width: 0px; height: 0px;"></textarea>
</div>
<div id="inputDiv">
<input id="input" spellcheck="false" style="border: none; outline: none; box-shadow: none; overflow:hidden; width: 0px; height: 0px;"></input>
</div>
<div id="textAreaDiv"></div>
<div id="inputDiv"></div>
</body>
</html>