I am using twebRichedit, the Richedit function of TMS web core, to create logic that strikes out a selected word when the speedbutton is clicked.
procedure TForm1.WebFormCreate(Sender: TObject);
begin
WebRichEdit1.Lines.Text := 'Hello world. I am testing WebRicheEdit strike-out function.';
end;
procedure TForm1.WebSpeedButtontestStrikeOutClick(Sender: TObject); // test strike out
begin
webRichedit1.SelAttributes.Style := [fsStrikeout]; // strike out
end;
When I select a word and click the speedbutton, the first time, the selected word will be strikeout successfully. (see following picture)
(select a word : "world" and click testStrikeOut speedbutton).
However, there is no strike-out from the second time onwards.
(select a word : "WebRicheEdit" and click testStrikeOut speedbutton).
Could you please tell me how to specify that the selected word should be strike-out from the second time onwards?
(Font color and font size changes work correctly from the second time onwards.
procedure TForm1.WebSpeedButtontestStrikeOutClick(Sender: TObject); // test strike out
begin
webRichedit1.SelAttributes.Style := [fsStrikeout]; // strike out: fail from second time onwards
WebRichEdit1.SelAttributes.size := 3; // font size: success any time
WebRichEdit1.SelAttributes.color := clRed; // font color: success any time
end;
)