On Sep 5, 2008, at 1:45 AM, kadm wrote:

- I can't style the form element at all, I mean when you click the
editable text and it is transformed into a textfield/textarea, it has
a plain style, I'm unable to customize it neither using {cssclass :
"someclass"} nor with {style : "property: atribute"}. Are those
options available and functioning OK? Why can it be failing?

Lets say you have something like this:

  $(".editable").editable("http://www.example.com/save.php";, {
      type   : 'textarea',
      submit : 'OK',
      cancel : 'cancel',
      cssclass : "editable"
  });

Generated HTML would be like this:

<form class="editable">
  <textarea name="value" ></textarea>
  <button type="submit">OK</button>
  <button type="cancel">cancel</button>
</form>

You should then be able to style textarea with something like:

form.editable > textarea {
  color : #F00
}

- When I click an editable text, and then hit Enter or Esc or click
outside the textfield, the textfield goes back to text, as expected.
But when I have multiple editable texts in the same page (same
cssclass, obviously different IDs) and click/make editable one of
them, then click on another, the previous one doesn't reset its
editable state back to text, but the editable textfield persists.


If you have

$(".editable").editable("http://www.example.com/save.php";, {
    onblur     : 'cancel'
});

which is the default, Jeditable should work as you expect. See this demo page. Does it work as expected for you?

http://www.appelsiini.net/projects/jeditable/default.html

Are you sure you do not have onblur : 'ignore'?

--
Mika Tuupola
http://www.appelsiini.net/

Reply via email to