How can I use editable 'view-header-title' in my custom TextFileView?

Hi, I am currently developing a plugin for editing specific format text files in Obsidian, just like Excalidraw, which saves as text files but allows visualization of content with a custom interface.

I have already used registerExtensions and registerView in the plugin to register the necessary file extensions and views. Currently, I am able to read and display content from specific files.

However, I found that I couldn’t edit the title by clicking on the view-header-title at the top, thus changing the file name. I observed the built-in canvas view and excalidraw view, and found that both can be edited by clicking on the title in the view header. After inspecting the elements, I discovered that they both have the contenteditable attribute, just like:

<div class="view-header-title" tabindex="-1" contenteditable="true" spellcheck="false">Sample</div>

However, my View does not have the contenteditable attribute, like this:

<div class="view-header-title">My Title</div>

So I think I must have missed some important reference. This should be a common feature. How can I do it to make my view have the same function?