Jump to content

add css uniHtmlMemo


SayeyeZohor

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 comment
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 comment
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 comment
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 comment
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 comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...