What does this have to do with CKEditor? You're going to need to be more specific because what you asked doesn't make any sense. What are you trying to do, what have you written to try and do it, and what is going wrong?
I use jQuery in conjunction with CKEditor to do DOM manipulation work. I don't want to have to use CKE's API to do fundamental operations like that. As such, I don't have any experience with CKE's DOM functions... perhaps someone else.
From what you described above, I presume you are using a CKE dialog window, that the {id,type,html} are one of the content elements within the dialog specification and that within the dialog's functional code you want to modify what you've already created. Pretty basic stuff, but like I said, I use jQuery to do those operations since I had some difficulty with CKE DOM API methods as well.
It's very similar to CKE's API mechanism. Just include jquery.js into your application and then where you want to update the content do something like:
what?
What does this have to do with CKEditor? You're going to need to be more specific because what you asked doesn't make any sense. What are you trying to do, what have you written to try and do it, and what is going wrong?
hi i use this code
hi i use this code
set default _divPreview
var _divPreview = '<div style="text-align:center;"><div id="lll">AaBbYyGgLlJj</div><br></div>';
{id: 'htmlPreview',
type: 'html',
html: _divPreview}
i want to update _divPreview
var _ckDialog = window.CKEDITOR.dialog.getCurrent();
_ckDialog.getContentElement('tab-page1', 'htmlPreview').html('<div"><br /><div>شهاب</div><br>/div>');
but not chenge !(:
I use jQuery in conjunction
I use jQuery in conjunction with CKEditor to do DOM manipulation work. I don't want to have to use CKE's API to do fundamental operations like that. As such, I don't have any experience with CKE's DOM functions... perhaps someone else.
From what you described above, I presume you are using a CKE dialog window, that the {id,type,html} are one of the content elements within the dialog specification and that within the dialog's functional code you want to modify what you've already created. Pretty basic stuff, but like I said, I use jQuery to do those operations since I had some difficulty with CKE DOM API methods as well.
can you tell me how can i set
can you tell me how can i set html in jquery ! for example in tab-page1 tab i want to set htmlPreview how i can with jquery ?
It's very similar to CKE's
It's very similar to CKE's API mechanism. Just include jquery.js into your application and then where you want to update the content do something like:
jQuery('#htmlPriview').html(<div"><br /><div>شهاب</div><br>/div>');
skelly it's not work ... not
skelly it's not work ... not detect htmlPriview
I managed do this.
shahabksh i manage do update html element...
My plugin to preview with dialog:
CKEDITOR.dialog.add( 'previewDialog', function( editor ) { return { title: editor.lang.previewdialog.title, minWidth: 600, minHeight: 480, contents: [ { id: 'tab-Main', elements: [ { type: 'html', id: 'content', html: '' } ] } ], onShow: function() { var dialog = this; var data = editor.getData(); eHtml = dialog.getContentElement('tab-Main','content').getElement(); eHtml.setHtml(data); }, buttons: [ CKEDITOR.dialog.okButton ] }; });