Setting border color and onclick() event for selected word
Below is the code for highlighting the selected text
Code:
findText(str);
page()->setContentEditable(true);
m_Color.setNamedColor(hcolorlist[index]);
QVariant va
= page
()->mainFrame
()->evaluateJavaScript
(js
);
page()->setContentEditable(false);
"str" in the code is the selected word.
I want set border color and onclick() event for the selected word
I have heard that its possible using <span> tag. But not sure how to apply it here.
Is there anyother way, border and onclick() event could be implemented