jeditable textbox width
Asked Answered
C

1

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.

Cohn answered 22/9, 2009 at 4:39 Comment(0)
N
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>
Nucleonics answered 22/9, 2009 at 6:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.