How to set in the correct way also pure HTML without DIV element also for the form element?

I have tried to set CKEditor within two options using DIV element and also pure form within HTML.

It is working for the DIV element.

How to set in the correct way also pure HTML without DIV element also for the form element?
We have <form id=“MyForm1” and also Textarea id=“MyTextArea1”

Need help

<!DOCTYPE HTML>

<html>

<head>
<title>Custom CKEditor</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="js/ckeditor_settings1.js"></script>


<link rel="stylesheet" href="http://cdn.ckeditor.com/4.5.9/basic/skins/moono/editor_gecko.css" type="text/css" />
</head>

<body>

<!--<div id="MyDIVelement1">

</div>-->

<form id="MyForm1" class="" action="" method="post" role="form">

<dl>

<dd>
<textarea rows="12" name="ckeditorbody1" id="MyTextArea1" class="" placeholder="CKEditor Message"></textarea>
</dd>

</dl>

</form>

<script src="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.6.2/ckeditor.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.6.2/adapters/jquery.js"></script>

</body>

</html>

Javascript function (ckeditor_settings1.js):

jQuery(function()
{

jQuery('#MyDIVelement1').html("<form><textarea id=MyTextArea1></textarea></form>");

jQuery('#MyDIVelement1').hide();
jQuery('textarea#MyTextArea1').ckeditor(
{
height: "400px",
toolbarStartupExpanded: true,
width: "100%"
}
);

jQuery('#MyDIVelement1').hide();

window.setTimeout(function()
{
jQuery('#MyDIVelement1').show();
}, 2000
);

}
); 


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.