Hi, I used this kind of javascript to insert text into ckeditor:
<script src="../javascript/jquery.js" type="text/javascript"></script>
<script src="../ckeditor/ckeditor.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
CKEDITOR.replace('lin');
$('#b').click(function() {
var element = CKEDITOR.dom.element.createFromHtml('<span>insert text</span>');
CKEDITOR.instances.lin.insertElement(element);});
});
</script>
<div>
<textarea rows="2" cols="20" class="a" name="lin" >some text</textarea>
</div>
<br /> <div id="b">insert span</div>
This kind of code works fine in firefox and chrome, but nothing happened when I click the "#b" div in ie6.
Please help me...
<script src="../javascript/jquery.js" type="text/javascript"></script>
<script src="../ckeditor/ckeditor.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
CKEDITOR.replace('lin');
$('#b').click(function() {
var element = CKEDITOR.dom.element.createFromHtml('<span>insert text</span>');
CKEDITOR.instances.lin.insertElement(element);});
});
</script>
<div>
<textarea rows="2" cols="20" class="a" name="lin" >some text</textarea>
</div>
<br /> <div id="b">insert span</div>
This kind of code works fine in firefox and chrome, but nothing happened when I click the "#b" div in ie6.
Please help me...