i want to add indent in first line of pharagraph,
currently i using this code for every single pharagraph element :
const originalHTML = $w('#pharagraphElement').html.toString();
const originalText = $w('#pharagraphElement').text;
const openingTag = originalHTML.substring(0, originalHTML.indexOf('>') - 1);
const closingTag = originalHTML.substring(originalHTML.lastIndexOf("<"));
$w('#pharagraphElement').html = openingTag+'text-indent: 4em;">' + originalText + closingTag
how can i apply the above code to every pharagraph element ( elements started with <p html tag because i don’t want non pharagraph element like the heading <h1 , <h2, etc have indent )
maybe querying elements with <p html tag and then place the code in ‘site code’ instead of ‘page code’ , but i dont know how to do this.
as you know wix’s built-in pharagraph editor doesn’t have a feature to add indent in only first line of pharagraph ( indent all pharagraph lines instead , or i just missing something ?)