#selection api How to Use the JavaScript Selection API: Build a Rich Text Editor and Real-Time Element Detection