Welcome to WebmasterWorld Guest from 18.206.16.123

Forum Moderators: open

Message Too Old, No Replies

Custom CKEditor settings

     
7:48 am on Apr 6, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Oct 25, 2006
posts:1104
votes: 1


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
);

}
);
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members