ducksboard / gridster.js

gridster.js is a jQuery plugin that makes building intuitive draggable layouts from elements spanning multiple columns
http://gridster.net/
MIT License
6.03k stars 1.2k forks source link

Text in the gridster container not selection #345

Closed cyberfuhrer closed 10 years ago

cyberfuhrer commented 10 years ago

http://jsfiddle.net/rd2d2/h5eYR/1/ I need to make the text editable. How to fix?

user5253 commented 10 years ago

I faced the same problem. Did this trick to solve it. Add class editable to the element you want to make editable. Let me know if there is any better approach.

  $(".editable").click(function(){
                gridster.disable().disable_resize();
                $(this).attr("contenteditable","true");
                $(this).focus();
            })
                    .blur(function(){
                        gridster.enable().enable_resize();
                    });
        });
cyberfuhrer commented 10 years ago

@moizpalitanawala Big Thanks!