I have a rather strange request. . That is, when the textarea is not selected by the mouse, there will be a line of gray prompts in the text box. This is very simple, it can be achieved by using value, placeholder and so on. But when you click to select the textarea, that is, when you start typing content, there must be a line of content filled in by default in the textarea. .
There is no picture, so I will explain it using the format.
[#我是defaulttitle# I am placeholder]-->The content displayed before the textarea is not selected.
[#我是defaulttitle#]--> After selecting the textarea, the content in the text box will disappear but the default title will remain.
How to implement such a function?
I think it’s better to turn your question into a command. Here is my basic implementation.
The basic idea is to control it through the model's controller.