Hi.
I am using the TMSFNCWXHTMLMemo in a WebCore project.
I create the component in run-time and set the visibility of some toolbar buttons. This was working last week (I don’t remember which FNC version was installed then), but now, I have rebuild the project with the latest version, and this behavior is broken.
This is the code I use to create the editor in run time:
(I have injected a div in the DOM with the ID 'EDT_RT')
procedure SetupRichEdit(AttribElem: TJSHTMLElement);
var DivContainer:TWebHTMLDiv;
HTMLMemo:TTMSFNCWXHTMLMemo;
begin
DivContainer:=TWebHTMLDiv.Create('EDT_RT');
HTMLMemo:=TTMSFNCWXHTMLMemo.Create(DivContainer);
HTMLMemo.Toolbar.Buttons.FontStyle.BtFontName := False;
HTMLMemo.Toolbar.Buttons.FontStyle.BtColor := False;
HTMLMemo.Toolbar.Buttons.FontStyle.BtFontSize := False;
HTMLMemo.Toolbar.Buttons.Misc.BtCodeView := True;
HTMLMemo.Parent:=DivContainer;
HTMLMemo.Left := 0;
HTMLMemo.Top := 0;
HTMLMemo.Width := 537;
HTMLMemo.Height := 303;
HTMLMemo.Align := alClient;
HTMLMemo.ParentDoubleBuffered := False;
HTMLMemo.DoubleBuffered := True;
HTMLMemo.Font.Height := -15;
HTMLMemo.Font.Name := 'Roboto';
HTMLMemo.ParentFont := false;
HTMLMemo.TabOrder := 0;
HTMLMemo.ElementHandle.style.removeProperty('position');
end;
For test purpose, I tried the following:
-
I put the component on the form in design time and set the properties for the buttons: this works.
-
Then I added a WebButton on the form and in its event, changed the visibility of some toolbar buttons. This does nothing. I guess it is the same reason than why my code is no more working.