How can I add FontAwesome "font images" to Popup menu in Extension Library in XPages - dojo

I am using the popup menu in Extension Library like this
<xe:popupMenu id="pop">
<xe:this.treeNodes>
<xe:basicContainerNode image="/vwicn148.gif" label="Container">
<xe:this.children>
<xe:basicLeafNode label="Child" image="/vwicn148.gif"></xe:basicLeafNode>
</xe:this.children>
</xe:basicContainerNode>
</xe:this.treeNodes></xe:popupMenu>
And it look like this with an image added before the label
As my site is using only "font icons" from FontAwesome I want to display these instead of normal images. how can I do that?

You have 4 options (and they are not pretty):
use a custom renderer as Tim suggested
subclass the control so label is rendered passthrou
lobby the ExtLib team to add new properties
use an XSP.OnLoad script to add the font awesom tags

Related

CKeditor image toolbar without upload

CKeditor5 by default has image plugins that support toolbar icons which can insert an image by (a) uploading the image and (b) insert an IMG tag into the HTML.
We do not want any capability to upload an image, but we need a simple widget that takes user input and inserts an image tag with attributes (user supplied) including e.g. SRC, HEIGHT, WIDTH, CLASS.
Seems strange that this isn't available in the standard build, have I missed it somehow?
Do we have to write our own plugin?
Custom build your CKeditor here:
https://ckeditor.com/ckeditor-5/online-builder/
Use toolbar item 'imageInsert'
relevant plugins:
Image,
ImageCaption, // adds ability to caption image via the toolbar
ImageInsert,
ImageResize, // this will cause resize handles to appear in the editor, operates by applying CSS to the enclosing <figure> tag
Also useful plugin
LinkImage, // adds link capability when editing an inserted image
Found the relevant doc here
https://ckeditor.com/docs/ckeditor5/latest/features/images/image-upload/images-inserting.html

Use an Icon Font in Xamarin Forms TabBar

I am just getting started with Xamarin Forms, so please excuse what may well be a rookie question...
I started out with a new Shell Forms App in Visual Studio, so some code was generated for me.
There is an AppShell page which contains a TabBar control. Inside this are Tab controls were I can set my ShellContent pages.
Each Tab has an Icon property, but this apparently only accepts PNG icons.
How can I use an icon font (which is already hooked up to display icons correctly as I am using them in the content of another page) for my Tab icons in Xaml?
I am using Xamarin.Forms 4.0.0.497661
You have to use FontImageSource to do that.
<Tab Title="MyTitle">
<Tab.Icon>
<FontImageSource FontFamily="{StaticResource IconFont}" Glyph="" Size="Small"/>
</Tab.Icon>
...
</Tab>
The solution below worked for me.
Copied the files from fontawesome inside Assets folder
fa-brands-400.ttf
fa-regular-400.ttf
fa-solid-900.ttf
Important the reference "Font Awesome 5 Brands" according to icon needed
<Tab.Icon>
<FontImageSource FontFamily="fa-brands-400.ttf#Font Awesome 5 Brands" Glyph=""/>
</Tab.Icon>
That's a great question. You can't use the tab icon property in a straight forward way to accept the icon font, unless you convert it into a PNG.
If you want to go that route, you can try this, you might have to deal with permissions for saving images. Worth a try!
You can do that with custom renderers as a workaround. Check this example on GitHub here: https://github.com/winstongubantes/Xamarin.Forms/tree/master/CustomIconizeFont

How to extend the Image plugin in ckeditor5 with custom elements?

We're evaluating an upgrade from ckeditor 4 to the new ckeditor 5, but I need to be able to extend the Image plugin/package with some custom elements, e.g. a text input for licensing information about the image, a button/checkbox for toggling the image to be a thumbnail or not etc.
How can I add these custom elements in the image package and write my own javascript code to handle the values from these elements?
The image toolbar is being controlled by the config.image.toolbar property. It accepts names of UI components registered in the editor.ui.components factory. In other words, it works like the main editor toolbar which is configurable via editor.toolbar and you can learn more how to create buttons here: Creating a simple plugin.

ExtJS - Changing default button styles and fonts

I have this requirement where I have to change the default styles on my Ext JS application. I am not talking about changing stuff in CSS files yet. I am not that ambitious yet. Here is what I am looking for:
Suppose I need a Submit and Cancel buttons, I use xtype:button and text:Save ( or Cancel ). This will render buttons with the text on them. What should I do if I want to change the look and feel of the button? Or replace the button with a cool Save or Cancel image?
Right now I have all the texts on the application with the default font that ExtJS shows. What am I supposed to do if I want all the text on the application changed to a different font? Everything right from the data in forms/grids and the titles of each component should be changed to some other font my customer prefers. What am I supposed to do?
I understand these are very basic and a generic questions, but I am looking for a good headsup before I proceed with my task.
Thank you all in advance. Waiting for answers :)
Update: So, I found out how we deal with CSS and change the fonts. Can anyone help about the Chaning the look and feel for Submit/Cancel buttons.
I recommend you to use SASS and compass to build your own themes, or better said to change one the existing themes. In the Ext JS documentation you can find the css variables which you can set according to your needs.
If you are not ready for theming with SASS just yet take a look at this example of button configs from the sencha docs:
Stanadalone Example page: http://docs.sencha.com/extjs/4.1.3/extjs-build/examples/button/button.html
CSS that adds customized images to the buttons: http://docs.sencha.com/extjs/4.1.3/extjs-build/examples/button/button.css
JS that shows button configs: http://docs.sencha.com/extjs/4.1.3/extjs-build/examples/button/button.js
Essentially this shows how to use iconCls property on the button config along with a simple CSS class to add desired image to your button.

XPages Extension library DOJO Tab container control CSS Modifications

I want to know, Is there any way to change the Style sheets of the extension library DOJO Tab container control?
Thanks & regards,
Yogesh Kashid
The best way to change the Style sheets of the extension library DOJO Tab container control is to create and use an own css resource. This way you can change every single table part's look and it would be valid for all DOJO Tab container controls in your application.
Create under Resources\Style Sheet a my.css file
Add the Style changes for DOJO Tab classes in my.css file. The style classes start with "dijitTab..." and you can find them analyzing the rendered page in browser.
For changing the tab labels to red you would write e.g.
.dijitTabContainerTopNone {
color: red;
}
3 . Add the my.css class to your theme
<theme extends="oneuiv2.1">
<resource>
<content-type>text/css</content-type>
<href>my.css</href>
</resource>
</theme>