Somebody Please help I have pretty much tried everything now... I cant even remember where I am..
I am trying to open ckeditor in jquery dialog first time it opens with the ckeditor box perfect I click it again the jquery dialog loads with textarea with no editor.
I am assuming its because I am not destroying it properly or reinitializing I have no idea Here is a few snippets of what i have tried.
<script type="text/javascript">
if (CKEDITOR.instances['ContentText']) {
CKEDITOR.remove(CKEDITOR.instances['ContentText']);
}
CKEDITOR.replace('ContentText',
{
disableObjectResizing: true,
resize_enabled: false,
shiftEnterMode: CKEDITOR.ENTER_BR,
toolbarCanCollapse: false,
forcePasteAsPlainText: true
});
</script>
<script type="text/javascript">
if (CKEDITOR.instances.ContentText) {
CKEDITOR.instances.ContentText.destroy();
}
CKEDITOR.replace('ContentText',
{
disableObjectResizing: true,
resize_enabled: false,
shiftEnterMode: CKEDITOR.ENTER_BR,
toolbarCanCollapse: false,
forcePasteAsPlainText: true
});
</script>
This is code at the end of the form in the partial view I have tried in the dialog close funtion in the view
tried editor destroy.. if you want to see the code in action i can deploy it. I am going insane
I am trying to open ckeditor in jquery dialog first time it opens with the ckeditor box perfect I click it again the jquery dialog loads with textarea with no editor.
I am assuming its because I am not destroying it properly or reinitializing I have no idea Here is a few snippets of what i have tried.
<script type="text/javascript">
if (CKEDITOR.instances['ContentText']) {
CKEDITOR.remove(CKEDITOR.instances['ContentText']);
}
CKEDITOR.replace('ContentText',
{
disableObjectResizing: true,
resize_enabled: false,
shiftEnterMode: CKEDITOR.ENTER_BR,
toolbarCanCollapse: false,
forcePasteAsPlainText: true
});
</script>
<script type="text/javascript">
if (CKEDITOR.instances.ContentText) {
CKEDITOR.instances.ContentText.destroy();
}
CKEDITOR.replace('ContentText',
{
disableObjectResizing: true,
resize_enabled: false,
shiftEnterMode: CKEDITOR.ENTER_BR,
toolbarCanCollapse: false,
forcePasteAsPlainText: true
});
</script>
This is code at the end of the form in the partial view I have tried in the dialog close funtion in the view
tried editor destroy.. if you want to see the code in action i can deploy it. I am going insane