The issue with selecting the TinyMCE iframe using a JS file.
$(document).ready(function() {
console.log("Connected!!");
let iframe = document.getElementById("myTextarea_ifr");
let body = iframe.contentWindow.document.querySelector("#tinymce");
body.innerHTMl = localStorage["body111"] || '<p><strong>2</strong> PROGRAM CURRICULUM AND TEACHING LEARNING PROCESSES (120) <br><strong>2.1</strong> Program Curriculum (20) <br><strong>2.1.1</strong> State the process used to identify extent of compliance of the University curriculum for attaining the Program Outcomes and Program Specific Outcomes as mentioned in AnnexureI. Also mention the identified curricular gaps, if any <br>Open Seperately (SARUGTireIITemplateRevisedQuestion.aspx?Appid=1660&Progid=558&QuestID=22) <br>(State the process details; also mention identified curricular gaps). <br><strong>Note</strong> : In case all POs are being demonstrably met through University Curriculum then 2.1.2 will not be applicable and the weightage of 2.1.1 will be 20.</p><p><br></p><p><img class="mce-pagebreak" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-mce-resize="false" data-mce-placeholder=""></p><p><br></p><p><strong>2.1.2</strong> State the delivery details of the content beyond the syllabus for the attainment of POs and PSOs (10) Open Seperately (SARUGTireIITemplateRevisedQuestion.aspx?Appid=1660&Progid=558&QuestID=23) <br>(Provide details of the additional course/ learning material/ content/ laboratory experiments/ projects etc., arising from the gaps identified in 2.1.1 in a tabular form in the format given below) <br><strong>Note</strong> : Please mention in detail whether the Institution has giv...
setInterval(function() {
localStorage["body111"] = body.innerHTMl;
}, 10);
});
When attempting to select the iframe element within the file using JavaScript, there seems to be an issue. The console returns undefined
when running iframe
. However, once I run
let iframe = document.getElementById("myTextarea_ifr");
in the console, iframe
is successfully initialized with the iframe object. Despite seeing the message Connected!!
in the console, indicating that the file is connected, how can I effectively select the iframe element from within the file?