WARNING: better don't try this when you have any relevant notebooks open, the generated palette will edit your currently selected notebook in ways which are not easily noticed or undone!
AutoAction will repeatedly take effect when cursor over the button of pallete.
Cell[BoxData[\(\(CreatePalette[\({\(Button[\("Create Inline Cell", \(\(FrontEndExecute[\(FrontEndToken["CreateInlineCell"]\)]\)[\(NotebookRead[\(InputNotebook[]\)]\)]\), \(AutoAction -> True\)\)]\)}\)]\) ;\)], "Input"] Here is one pallete to create inline cells, I wish it would perform only once when the selected content is the same.
How to make AutoAction Take effect only for different selected contents
Welcome to add an button to revert the value, ie convert new generated inline cell back to the prevous state(maybe plaintext).
What is the same content: In one Text Cell, content is who are you. when selected content is who, just convert who into one inline cell, if second time, i select who are they are not the same contents.
who are you. when selected content iswho, just convertwhointo one inline cell, if second time, i selectwha arethey are not the same contents. $\endgroup$