elRTE in jquery ui dialog
Added by Muresan Alex over 1 year ago
I can't make elrte work in jquery ui dialog, it just doesn't start.
Anyone else had this problem?
Replies (7)
RE: elRTE in jquery ui dialog
-
Added by Troex Nevelin over 1 year ago
We haven't tried it yet, but I guess there should be problems. Try to look for errors using FireBug
RE: elRTE in jquery ui dialog
-
Added by Muresan Alex over 1 year ago
why "but I guess there should be problems" ?
RE: elRTE in jquery ui dialog
-
Added by Troex Nevelin over 1 year ago
There have been problems with elRTE with jquery ui tabs. The problems it that ui-dialog is not the same as browser window. elRTE heavily replies on browser and ui-dialog is limited and don't have all needed events functions that elRTE requires.
There was discussion about this on Russian forum http://elrte.org/redmine/boards/3/topics/186, use google translator and look for the code.
I haven't dig in this problem so I can only give some directions where to search for solution.
RE: elRTE in jquery ui dialog
-
Added by Troex Nevelin over 1 year ago
The most common problem about elRTE in dialog is that you try to create elRTE instance before your dialog is opened and before your elRTE node exists in DOM tree as a result elRTE cannot init itself, here is quick example how it should be done:
1 $('#dialog').click(function() { // open dialog on click
2 var dialog = $('<div>').dialog({
3 title : 'Editor in dialog',
4 width : 600
5 });
6 // create element for elRTE
7 var rteInDialog = $('<div>Content for editor in dialog</div>');
8 // put element inside dialog
9 dialog.append(rteInDialog);
10 // create elRTE on element
11 rteInDialog.elrte(opts);
12 });
RE: elRTE in jquery ui dialog
-
Added by Julien d'Adhemar 11 months ago
Hi,
Got the same problem, but i m using an ajax call to load my form in the dialog. the elrte instance is in the page form, when the DOM is ready.
Any solutions ?
Thanks
RE: elRTE in jquery ui dialog
-
Added by Dmitry Levashov 11 months ago
elRTE instance must be created after form set visible
RE: elRTE in jquery ui dialog
-
Added by Julien d'Adhemar 11 months ago
ahhhhh
what i did :
onclick button : creating dialog, loading the form, open the dialog, instance the elrte.
work fine !
Thanks for your help !
(1-7/7)