开发者

Can't edit after erasing all the text in Prototype's inPlaceEditor

开发者 https://www.devze.com 2023-02-10 05:41 出处:网络
All the examples of Prototype\'s inPlaceEditor I\'ve found suffer from the same problem. When you enter edit mode and erase all the text and click OK you can开发者_JAVA百科\'t edit any more because th

All the examples of Prototype's inPlaceEditor I've found suffer from the same problem. When you enter edit mode and erase all the text and click OK you can开发者_JAVA百科't edit any more because the <p> tag is empty and there is nothing to click on! Here is an example too: http://24ways.org/examples/edit-in-place-with-ajax/ So how do you make in-place edit of an empty field, like an empty <td>?


It's very simple, just add these lines to your CSS code:

p.editable {
    min-height: 10px;
}

You can add a border, too, but that isn't required.

0

精彩评论

暂无评论...
验证码 换一张
取 消