Jump to content

Recommended Posts

Posted

Hi Erich,

 

For now can you try this?:

 

UniDBHTMLMemo1->ClientEvents->ExtEvents:

function afterrender(sender, eOpts)
{
  if (Ext.get(sender.el.select('select').elements[0]) && Ext.get(sender.el.select('select').elements[0]).select('option').elements[2]) {
    Ext.get(sender.el.select('select').elements[0]).select('option').elements[2].remove()
  }
}

UniDBHTMLMemo1->ClientEvents->UniEvents:

function beforeInit(sender, config)
{
  config.fontFamilies = ['Arial', 'Roboto'];
  sender.listeners = {
        initialize: function(fld, opts) {
            var fontSelector = fld.down('#fontSelect'),
                el = fontSelector.getEl(),
                select = el.down('select').dom;
                doc = Ext.get(fld.getEditorBody());
            select.value = 'arial';
            doc.setStyle({fontFamily: 'arial, roboto'});
        }
    }
}

Best regards.

  • Upvote 1
  • 1 year later...
Posted

Hello,

 

if i use the solution, i can select a text and give him the "Roboto"-Font  (which i inkluded in my unigui-Application ... on a uniForm . i can give a Unilabel the "Roboto" font and i see at runtime the right font)

 

But the editor shows allways the text as "times new Roman" fonttype - although the text is marked as "roboto? ..

 

the source-code-viewer of uniHtmlMemo shows:

 

<font face="roboto">this is a test text
</font>
 
 

 

 

Any ideas?

Posted

Hi Delphi Developer :-)

 

i found the reason - but did not know how to solve it ....

 

 

If i add with chrome developer tools this line    [<link rel=stylesheet href="/files/css/sec.css" /> ]

to the Iframe - section "head" of the UniHTMLMemo -> it works

 

But how can i add this line to the iframe of UniHTMLMemo > Head-section ?

 

post-1295-0-47905500-1516723312_thumb.jpg

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...