Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removed use of stripHtml
  • Loading branch information
Shivam7-1 authored Jan 13, 2025
commit 7e41f5c7fcd39f74283edf8a7a87a015735b51de
Original file line number Diff line number Diff line change
@@ -33,14 +33,13 @@ function stripHtml(html: string) {
* @param {Element} element
*/
function handlePlaceholderClass(element: Element) {
if (stripHtml(element.textContent).length === 0) {
if (element.textContent.length === 0) {
element.textContent = "";
element.classList.add("placeholder-text");
} else {
element.classList.remove("placeholder-text");
}
}

// Custom Knockout binding for live editing text inputs
ko.bindingHandlers.liveEdit = {