+ 3

[SOLVED] Problem with placeholder text in Ace Editor

I wanted to add a placeholder to my Ace Editor when the editor is empty. So, I got one solution from stackoverflow. It is working with one editor. But I have 2 editors on the page, so I need to add placeholder for both editors. But it is not working properly. The placeholder text is placed on both editors but it is not hiding when user starts to input. I tried this in 2 ways: Creating 2 functions for both textarea and creating common and passing the editor name and placeholder text as parameters. But in both cases the placeholder text is not hiding. Have a look at my code what's wrong, or share of you have another way to add placeholder in Ace Editor. Check my code here. https://code.sololearn.com/WTU3KXB1Lcs8/?ref=app

4th Dec 2020, 9:56 AM
Bibek Oli
Bibek Oli - avatar
3 Respuestas
+ 1
That can be done by using 'placeholder' option. https://code.sololearn.com/WTGfWO825uSe/?ref=app
12th Dec 2020, 10:50 AM
Bibek Oli
Bibek Oli - avatar
- 1
هل بتنبنغعذتل رببتابةغ البابا اداايقهذولابلاذودوزوني ولتلهبتدعلةبال ابااتللتتلتب
9th Dec 2020, 12:14 AM
سلاف سلاف
سلاف سلاف - avatar
- 1
jfhutuh bgjxjfgjijjkhjht8jt8vmtytyru A
9th Dec 2020, 12:15 AM
سلاف سلاف
سلاف سلاف - avatar