11

is there anyway to make the textbox bigger than the text when using inline replace with jeditable. I want to give the user room to add new text on top of the existing text.

leora
  • 188,729
  • 360
  • 878
  • 1,366

1 Answers1

26

You can specify height and width in settings to set the textbox to specific height and width. There is also a function callback onedit which you can hookup to set specific size of edit box this did not work.

<span id="edit">hello world!</span>

<script type="text/javascript">
 $(document).ready(function(){
 $("span#edit").editable("....",
 {
            event: "click",
            style: "inherit",
            onblur: "submit",
            width:($("span#edit").width() + 200) + "px", // THIS DOES THE TRICK
            height:($("span#edit").height() + 100) + "px", //THIS DOES THE TRICK
            placeholder: "Click to set text",
            tooltip: "Click to update"
        });
   });
</script>
Matt Greer
  • 60,826
  • 17
  • 123
  • 123
TheVillageIdiot
  • 40,053
  • 20
  • 133
  • 188