Remove text on click

Posted over 5 years ago by Abdelrahman Saleh Attia

Post a topic
Answered
A
Abdelrahman Saleh Attia

Hello, I have text areas in the product stage designer, it has placeholder text, I wanted to figure out how can I remove the placeholder text on single click instead of having to double click to select all then delete it manually.

I tried to do some coding but I am not very good with javascript, My issue is how to get the existing canvas element then edit it 

Currently I have something like this but I get error undefined stage 

 

stage.on("text:editing:entered", clearText);

function clearText(e) {
  if (e.target.type === "i-text") {
    if (e.target.text === "Tap and Type") {
      e.target.text = "";
      stage.renderAll();
    };
  }
}

 

1 Votes

rady kal

rady kal posted over 5 years ago Admin Best Answer

Please state your topic in the feature request forum so we can have this in mind on for further Updates.

0 Votes


8 Comments

Sorted by
M

Massimiliano posted about 4 years ago

I think this feature would be useful too, so if VanessaFancyPD wants to create a new feature request I will support it.

0 Votes

rady kal

rady kal posted about 4 years ago Admin

Not yet. You could head on over to the feature request forum and have a look at the discussions there or add a new topic with a request for the feature you are looking for so we can keep it in mind for further updates. The more people agree with you, the more likely we are going to implement this feature.

0 Votes

V

VanessaFancyPD posted about 4 years ago

And it's also a pain to have the mobile users click the tiny "clear" icon in order to get rid of the pre-filled in text that appears inside the fill-able boxes.  Why can't the pre-filled in text just clear when clicked into the box?  I don't understand.  This is how most websites handle fill-able boxes.  Not sure why this one is kinda way out there as far as something so rudimentary?

0 Votes

P

Philip Wall posted over 4 years ago

Any update on this, as it's a pain for users to have to delete the text on selecting the text box.

0 Votes

M

Massimiliano posted over 5 years ago

Hello Radykal, was this point addressed in the latest release, by chance?


Thanks

Max

0 Votes

rady kal

rady kal posted over 5 years ago Admin Answer

Please state your topic in the feature request forum so we can have this in mind on for further Updates.

0 Votes

C

CHRiS posted over 5 years ago

Yes that would be very good and easier for the customers with just one click. Would be great if you could do it that way.

0 Votes

W

Will Turner posted over 5 years ago

I have the same issues and I'm also trying to solve the same problem.

Biggest drama is that if you use your above example then everytime someone clicks the text box then the field gets cleared which is not ideal for most applications.


If I get anywhere Ill let you know.

0 Votes

Login or Sign up to post a comment