Jump to content

add css uniHtmlMemo


Recommended Posts

7 minutes ago, SayeyeZohor said:

tnx 1- how to change or add CSS For uniHtmlMemo ? 

border, ......

 

7 minutes ago, SayeyeZohor said:

i have above problam ...

Please explain in more detail. Make a simple testcase by indicating where the problem occurs.

Link to post
Share on other sites
11 minutes ago, SayeyeZohor said:

i waiting for ... tnx

Hello,

Sorry for the late reply.

Try this:

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  with UniHTMLMemo1 do
    JSInterface.JSAddListener('initialize', 'function(editor){'+
                              '  const bodyArea = editor.getEditorBody();'+
                              '  bodyArea.style["border"] = "1px solid";'+
                              '  bodyArea.style["border-radius"] = "4px";'+
                              '  bodyArea.style["padding"] = "12px 10px";'+
                              '  bodyArea.style["line-height"] = "2";'+
                              '}'
    );
end;

 

  • Like 1
Link to post
Share on other sites
12 hours ago, Sherzod said:

Hello,

Sorry for the late reply.

Try this:


procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  with UniHTMLMemo1 do
    JSInterface.JSAddListener('initialize', 'function(editor){'+
                              '  const bodyArea = editor.getEditorBody();'+
                              '  bodyArea.style["border"] = "1px solid";'+
                              '  bodyArea.style["border-radius"] = "4px";'+
                              '  bodyArea.style["padding"] = "12px 10px";'+
                              '  bodyArea.style["line-height"] = "2";'+
                              '}'
    );
end;

 

tnx how to add css to unimemo or other component?

@Sherzod

 

Link to post
Share on other sites
  • 11 months later...

Hello, Any Solution? The BORDER BLACK , How to remove this other border ???

This result

  UniHTMLMemo2.JSInterface.JSAddListener('initialize', 'function(editor){'+
                              '  const bodyArea = editor.getEditorBody();'+
                              '  bodyArea.style["border"] = "1px solid";'+
                              '  bodyArea.style["border-radius"] = "5px";'+
                              '  bodyArea.style["padding"] = "5px";'+
                              '  bodyArea.style["line-height"] = "2";'+
                              '  bodyArea.style["background-color"] = "#0190FD";'+
                              '  bodyArea.style["background-image"] = "linear-gradient(180deg, #0190FD, #0169FF)";'+
                              '}'
    );

 

image.png.5cf35e3a28d548e1459fa4661fa2df90.png

Link to post
Share on other sites
  • 3 weeks later...
On 12/4/2020 at 11:03 PM, Daha Software said:

Any Solution? The BORDER BLACK , How to remove this other border ???

This result

  UniHTMLMemo2.JSInterface.JSAddListener('initialize', 'function(editor){'+
                              '  const bodyArea = editor.getEditorBody();'+
                              '  bodyArea.style["border"] = "1px solid";'+
                              '  bodyArea.style["border-radius"] = "5px";'+
                              '  bodyArea.style["padding"] = "5px";'+
                              '  bodyArea.style["line-height"] = "2";'+
                              '  bodyArea.style["background-color"] = "#0190FD";'+
                              '  bodyArea.style["background-image"] = "linear-gradient(180deg, #0190FD, #0169FF)";'+
                              '}'
    );

Hello,

Sorry for the late response. If the request is still valid, please create a simple test case.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...