Hello folks,
I've been trying to set the text to be used in the setData() function with no succes till now. The text is set using ASP code like located before the <html> tag:
set article = conn.execute("SELECT * From Articles where ID='" & id & "'")
text = article("Body")
The script code to instantiate the CKEditor with the value already set is:
<textarea id="editor1" name="editor1" class="ckeditor" rows="20" cols="60">
</textarea>
<script>
// Replace the <textarea id="editor1"> with a CKEditor
// instance, using default configuration.
CKEDITOR.replace( 'editor1', {
filebrowserBrowseUrl: 'ckfinder/ckfinder.html',
filebrowserImageBrowseUrl: 'ckfinder/ckfinder.html?Type=Images',
filebrowserFlashBrowseUrl: 'ckfinder/ckfinder.html?Type=Flash',
filebrowserUploadUrl: 'ckfinder/core/connector/asp/connector.asp?command=QuickUpload&type=Files',
filebrowserImageUploadUrl: 'ckfinder/core/connector/asp/connector.asp?command=QuickUpload&type=Images',
filebrowserFlashUploadUrl: 'ckfinder/core/connector/asp/connector.asp?command=QuickUpload&type=Flash'
});
CKEDITOR.instances.editor1.setData( '<% = text %>', function()
{
this.checkDirty(); // true
});
This doesn't work though. However, If I put simply a string with plain text instead of ASP code in the text parameter, it works fine. Could anyone, please, show me the solution?