This is a migrated thread and some comments may be shown as answers.

Changing the editor cols

2 Answers 78 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Jesse
Top achievements
Rank 2
Jesse asked on 21 Jun 2012, 08:58 PM
I'm trying to change the Editors textarea cols property using the following

 var onCollapse = function(e) {
            $('#editor').attr("cols", 200);
            var editor = $("#editor").data("kendoEditor");
            editor.update();
        };

 $('#Splitter').kendoSplitter({
            collapse: onCollapse,
            panes: [
                { size: "300px", min: "100px", max: "300px", collapsible: true},
                { size:  "400px" }
            ]
        });

I know the event is firing and that the value is getting changed, but the editor size stays the same. Also I have try changing the editors css width property to no avail. Thanks

2 Answers, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 22 Jun 2012, 11:08 AM
Hello Jesse,

I am not sure if I understand you correctly - do you want to resize the editor? Could you give us more details about the scenario you are trying to implement?

On a side note, please keep it in mind that the cols property will be applied to the hidden text area and will not affect the size of the editor. 

Greetings,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jesse
Top achievements
Rank 2
answered on 22 Jun 2012, 02:59 PM
Perhaps that is why its not changing. I'm changing the size of the cols property when you collapse a splitter. Is there a method directly on the Html editor I can use to dynamically adjust the width?

Updated:
Ok I figured it out. I Just set the width property on the k-editor class when the splitter collapses. Thanks
Tags
Editor
Asked by
Jesse
Top achievements
Rank 2
Answers by
Iliana Nikolova
Telerik team
Jesse
Top achievements
Rank 2
Share this question
or