After reading the articles about creating your own WYSIWYG editors for admin panels, I assumed that for JavaScript there simply is no carriage inside the input fields, so it cannot work with it and solving such seemingly elementary tasks as carriage surrounding than -or the movement of the carriage to the desired position, registration of the current position of the carriage, etc., is achieved in rolls of unreadable code. Is it true that JavaScript does not see the caret in the browser?
Update (moved from comment)
Information from all the discussions in the comments will certainly come in handy, but I will return to the main topic. I will ask this: here is a cursor inside the input field and there is javascript. What is the reason why in native JavaScript there is no means to work with a carriage such as getCaretPosition() , moveCaretToPosition() , getTextAfterCaret() , etc.? Surely this is not laziness of developers, but some difficulties of JavaScript interaction with the browser.
javascript не видит никакого браузера- vp_arth