kkelchev Posted August 29, 2020 Share Posted August 29, 2020 Hi , How to change default font size for TUniDBHTMLMemo If you change font-size into object inspector (design Time). It not take effect runtime in Browser. Thanks Kamen Link to comment Share on other sites More sharing options...
kkelchev Posted September 1, 2020 Author Share Posted September 1, 2020 Please , any comments ? Link to comment Share on other sites More sharing options...
Sherzod Posted September 2, 2020 Share Posted September 2, 2020 On 8/29/2020 at 9:15 PM, kkelchev said: How to change default font size for TUniDBHTMLMemo Hi, Something like this, try: procedure TMainForm.UniFormCreate(Sender: TObject); begin with UniHTMLMemo1 do JSInterface.JSAddListener('initialize', 'function(editor){'+ ' const bodyArea = editor.getEditorBody();'+ ' bodyArea.style["font-size"] = "20px";'+ '}' ); end; 1 Link to comment Share on other sites More sharing options...
kkelchev Posted September 2, 2020 Author Share Posted September 2, 2020 Thanks Link to comment Share on other sites More sharing options...
newsanti Posted February 18, 2023 Share Posted February 18, 2023 On 9/2/2020 at 11:38 AM, Sherzod said: Hi, Something like this, try: procedure TMainForm.UniFormCreate(Sender: TObject); begin with UniHTMLMemo1 do JSInterface.JSAddListener('initialize', 'function(editor){'+ ' const bodyArea = editor.getEditorBody();'+ ' bodyArea.style["font-size"] = "20px";'+ '}' ); end; How to setting initial font-color with theme aria? setting with white is no effect. var oHtmlMemo:= AControl; oHtmlMemo.JSInterface.JsAddListener( 'initialize', 'function(editor){'+ ' const bodyArea = editor.getEditorBody();'+ ' bodyArea.style["font-size"] = "'+IntToStr(FormLinkOptions.FontSize+6)+'px";'+ ' bodyArea.style["fontFamily"] = "'+FormLinkOptions.FontName+'";'+ ' bodyArea.style["font-color"] = "white";'+ '}'); Link to comment Share on other sites More sharing options...
Sherzod Posted February 18, 2023 Share Posted February 18, 2023 2 hours ago, newsanti said: How to setting initial font-color with theme aria? setting with white is no effect. with UniHTMLMemo1 do JSInterface.JSAddListener('initialize', 'function(editor){'+ ' const bodyArea = editor.getEditorBody();'+ ' bodyArea.style["font-size"] = "20px";'+ ' doc = Ext.get(editor.getEditorBody());'+ ' doc.setStyle("color", "white");'+ '}' ); 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now