kkelchev Posted August 29, 2020 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 Quote
Sherzod Posted September 2, 2020 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 Quote
newsanti Posted February 18, 2023 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";'+ '}'); Quote
Sherzod Posted February 18, 2023 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.