How to do one-click translation of rich text input such as quill

1. How to translate the input of rich text with one click?
Rich text inputs are all marked with html tags. How to translate the contents of the tags well without affecting the original tags
for example:

<img src="xxx">

<span></span>

results after translation

hello

<img src="xxx">

<span>who am i?</span>

Nov.11,2021

are you doing dynamic translation here? Then get the tag content (string) and pass it to the background or Baidu translation such api, get the value and assign it back.
or do you do fixed character translation? consider i18n .

Menu