CKEditor (default) item in Font Name and Size dropdown - ckeditor

In the sample of CKEditor, the Font Name and Font Size dropdown have a item which is (default), which gives user to change the Font Name and Size back to the default setting.
Which when choose the default item in these two dropdown, the span created for specifying Font Name and Size was removed when we inspect the source of the content.
source: https://ckeditor.com/latest/samples/index.html
However, when i google through how to set this configuration, the normal answer is to set the default label, which can't achieve the effect shown in the sample.
May i ask how to set the configuration in order to achieve the same effect shown in the example?
Thanks a lot.

I'm not sure if this is exactly what you meant but if you are asking how to set default font through JavaScript then the answer is you can't do that. The default font can only be set in ckeditor/contents.css (look for the body element definition) for classic editor or main page CSS file for inline editor.
If you have set default font (inside your CSS) to Times New Roman, you can also set default font label to the same value so that default font is being shown whenever there is no matching font in current selection. Please see:
https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-font_defaultLabel
https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-font_names
Same can be done for Font Size:
https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fontSize_defaultLabel
https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fontSize_sizes
Please note that font dropdowns are not fully context sensitive meaning they only show given font name or size if there is an exact match. If CKEditor sets e.g. <span style="font-family:Courier New,Courier,monospace">test</span> the Font Dropdown will only display name Courier New if you have exactly span element with Courier New,Courier,monospace as font-family value inside set in your HTML. In all other cases "Default" label or default font name (if you have set font_defaultLabel) will be shown. This of course can lead to problems when you paste fonts (e.g. from MS Word) which are not defined in dropdown definition. In such a case editor will show invalid values because it will use Default label or default font name.
Problem can be worked around with the help of Advanced Content Filter (ACF) and addTransformations method. I have explained it briefly here.
Hope this helps.

Related

Can I set tab text color or icon to indicate validation errors on the page in Xamarin TabbedPage (iOS and Android)?

I want users entering data across multiple tabs to be able to see at a glance whether and where they have validation errors / fields not populated. I can indicate errors for the selected form in the form body, but for unselected tabs I want to use red color and/or a red icon in the tab to indicate if it is failing validation.
I see various posts explaining how to use a custom renderer or effect to set tab text color for all tabs or selected/unselected tabs (e.g. here, here, here modifying the framework itself and here). However, the posts I've seen do not show a way to change the color of a SPECIFIC tab. In this case I want to either change the color or add/remove an error icon that would show beside the Title in the tab header based on the validation results for the page accessed via the tab. Is that possible?
Update:
I also found this - seemed more promising because it does seem to change tabs based on their positions or title rather than just on whether they were selected or not, but it seems to be dependent on using bottom tabs, which I'm not doing.
I also have found this, and element.Children[i] does get me the ContentPage from which I can determine what color I want the tab's test to be, and it's possible that the tab variable that's returned by activity.ActionBar.GetTabAt(i) somehow gives me access to update the tab's text color, but I'm not seeing any method or property that seems promising - basically I still don't see how to get access to the UITabBarItem so I can call SetTitleAndAttributes on it to set its text color. (Also, if I declare the tab variable by its type of Android.App.ActionBar.Tab instead of using var, I get a note saying that type has been deprecated. It seems upon investigation that the whole ActionBar class has been deprecated. But how can that be when it still exists as a property of Android.App.Activity, which is not deprecated?)
Many thanks for your assistance!

Change header font on vbalGrid

I'm maintaining a VB6 application that makes extensive use of the old VBAccelerator SGrid 2.0 (vbalGrid, using another Grid control isn't really an option). I need to change the grids font at run-time, and nothing I seem to do works to change the header font, only changing the grid controls Font property at design time seems to actually change the font.
Here is the code I've tried, which I would have thought would work:
Dim Fnt As New StdFont
Set Fnt = vbalGrid.Font
Fnt.Name = "MS Sans Serif"
Set vbalGrid.Font = Fnt
This sets the font for the body of the grid just fine, but you do have to clear and repopulate the grid if it already has data. However the header doesn't change, even if you clear all the columns and recreate them.
It looks like there is a bug in the Property Set Font routine -- it does not call BuildMemDC to invalidate its buffered output DC.
Try RowHeight(1) = RowHeight(1) + 1 or similar nudge to force BuildMemDC getting called. You'll have to increase the height of some row above its internal m_lMaxRowHeight variable for the rebuild to kick in.

Data visualization and icons placement

I would like to change line's parameters of data visualizer (I'm not sure is the data visualizer module) like in the following image :
I tried to change lineColor parameter of all visualizer module I've found in "IntegratedCanvasVisualizer.ned" but none has effect.
I'd like to set icons positions and size because when I zoom out all icons are "pulled up" resulting in this :
I had a look in the source code (NetworkNodeCanvasVisualization.cc), tried to change parameter (size, distance), none has effect.
How to hide node's name (e.g. host[4] in first image) ?
Thanks for support.
1.:
The red lines are OMNeT++'s (or, more precisely, Qtenv's) own built-in message visualizations. They are completely separate from the INET visualizers. Unfortunately, the thickness of these lines can't be changed at the moment.
Their color is determined by their (optional) DisplayStrings, see [1] and [2] for details. However, when the messages take their "line form", many of these tags, like the "shape", and "outline" are ignored.
If they have no color set in their DisplayStrings, Qtenv has an option to color the messages based on the value of their "kind" field [3].
If they are more in the way than they are useful, you can disable them globally in the Qtenv Preferences dialog, or you can disable message animations on a per-module basis, by setting the builtinAnimationsAllowed field to false.
2.:
I think you should submit this question separately in the INET bug tracker.
3.:
What #jerzy-d said. There is even a shortcut for this, Ctrl+L. Hiding the names of individual submodules is not possible right now.
Ad. 3. To hide names of modules right click on the network and deselect Show Module Names.

Is there a possibility to set the default font-size of a RDLC-Report in the designer

Is there a possibility to tell the designer or the report a default font-size, so that all new elements that are placed within the designer will take initially this font-size.
You can select multi-textbox and change the font size at the same time.

Dynamics AX 2009 Report: LabelPosition above does not work?

I'm just in the process of changing the SalesInvoice Report. One thing I'm trying to do is show the label of some items not left of the item value but above it instead.
Seems easy enough: just change the LabelPosition (for example from CustInvoiceJour_InvoiceId) setting from "left" to "above" and voila: the label has vanished. It is just shown nowhere at all.
Strange. I would have expected the label to show up, well, above the content. Not to vanish.
Am I missing something (there is no label height to set), or is this functionality broken?
I'm not sure if this functionality is broken. But in generated design, these elements will not show the label if it's set to above:
Prolog
PageHeader
Header
Footer
Epilog
ProgrammableSection
If the item you're trying to change is in one of those, then the label position above will, from my experience, not work.
My tip is to create a new control of the text type and then use the same label that the extended data type for the field uses under the "text" property and then adjust the position so it is positioned above the field you're trying to set a label on.
From what I have noticed for a ProgrammableSection the column name labels are not shown only on the first page of the report. The labels are shown on the next pages.

Resources