Add Place holder text in edit mode in AEM




Add placeholder text to component in the edit window.

While creating your component go to the html file add below snippet before writing your code.

<sly data-sly-test="${wcmmode.edit}">
    <p data-emptytext="configure ${component.title}" class="cq-placeholder"></p>
</sly>


Once you add the above code, when you go ahead and add your component to your page it contains placeholder text as :



Hope this helps!!

Happy Coding 🙏

If you like my post and find it helpful, you can buy me a coffee.

Comments

Post a Comment