I tried to use enclosed code to attach Editor to Layout cell. However Editor component remains inactive. Components - ver. 2.6 Browsers: IE, Opera, FF
…
... .....I tried to use enclosed code to attach Editor to Layout cell. However Editor component remains inactive. Components - ver. 2.6 Browsers: IE, Opera, FF
…
... .....Thank you for reply but this method doesn’t work correctly as I described in previous question (viewtopic.php?f=7&t=14399). With attachObject() instead of attachEditor() ‘Editor’ component in nested Layouts (in different Layout views) acts correctly but I can’t type and even set focus.
It really works now. But! When you try to resize layout’s cell, editor’s scroll doesn’t move. Please check attached image.
For this reason we recommend to use attachEditor(). In this case the editor will be resized.
I’d use attachEditor() instead of attachObject() if attachObject() component wasn’t buggy in layout views (when you try to switch views Editor component corrupts layout). Is it possible to make layout cell resize editor correctly with attachObject()?
attachEditor was designed to resize the editor when the layout cell resizes. attachObject resizes only container that is attached to the cell (not the elements inside it).
There isn’t a public method to resize editor when it is attached by attachObject method.
I’d use attachEditor() instead of attachObject() if attachObject() component wasn’t buggy in layout views (when you try to switch views Editor component corrupts layout).
Please provide the sample to recreate the problem
I’ve already posted the issue in viewtopic.php?f=7&t=14399
Just try to change views by clicking corresponding buttons and try to resize cell with editor inside.
[code]
ErrorYour demo works perfectly only in IE!
In Opera 10.60 when you try to resize cell with editor - see attached screen image.
In FF 3.5 - just the same bug as in Opera.
Hi,
we have reproduced the problem locally and try to fix it. I’ll provide the fix when it’s ready.
The problem occurs if the editor is initialized in a hidden container. You may try to use the following workaround:
<div id="editorCont" style="width:100%;height:100%;"></div>
..
LayoutNested1.cells("b").attachObject("editorCont");
[code]LayoutMain.cells(“b”).view(“first”).setActive();
initEditor();
function initEditor(){
if(Editor) return;
Editor = dhtmlXEditor(“editorCont”,“dhx_skyblue”);
LayoutNested1.attachEvent(“onPanelResizeFinish”,function(){
Editor.setSizes();
})
}[/code]
We have made a fix in the dhtmlxeditor.js for the attachEditor() method.
The demo is attached.
However, there content isn’t preserved in the editor when views are changed. Therefore you need to call getContent()/setContent methods.
Please have a look at the sample
09.zip (98.8 KB)
Thank you! However is it possible to fix ‘Editor’ component to make it save the content?
We’ll try to solve this problem. Currently please try to use the workaround with getContent() and setContent().