Frequently Asked Questions (FAQ)

Site: CIB eLearning
Course: CIB webRec
Book: Frequently Asked Questions (FAQ)
Printed by: Guest user
Date: Thursday, 26 December 2024, 10:21 PM

Could I hide toolbar and status bar?

Yes, you could hide toolbar and status bar by appending following CSS snippet at your integration side:

.toolbar
{
    display: none;
}
.status-panel {
    display: none;
}


Wrong icons in webRec toolbar under Tomcat

When Tomcat is not properly configured some of the icons in toolbar or text in menu for different languages could be displayed incorrectly.

You need to change JAVA_OPTS property – add this to your catalina.bat script:

  • Linux OS:

set JAVA_OPTS="$JAVA_OPTS -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8"

  • Windows OS:

set "JAVA_OPTS=%JAVA_OPTS% -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8"


Toolbar: How to customize "font" and "font size" toolbar inputs

Yes, you could customize them by applying CSS style in your custom CSS file:

.toolbar-input-fontName    { font-family: Arial, Helvetica, sans-serif; }
.toolbar-input-fontSize    { font-family: Arial, Helvetica, sans-serif; } .toolbar-input-lineSpacing { font-family: Arial, Helvetica, sans-serif; }

What’s difference between initialFont and fonts.defaultFontName

  • initialFont” (webrec.json/webrec.base.json) – font which will be used for any new created paragraph in the document
  • font.defaultFontName” (webrec.properties/application.properties) – first font which will be loaded before showing webRec document. When this font is loaded, webRec will be shown and document will be rendered with this font only. Then in background all other fonts will be downloaded and used inside the document. You could see this with https://localhost/webrec/examples/fullScreenDemo.html

At customer environment for better look and feel we expect both of them initialized with the same value:

  • “initialFont” : “Georgia"
  • fonts.defaultFontName = Georgia

But of course fonts.defaultFontName could be provided as any available font in setup (the smaller file size it has – the faster initial rendering of the document will be done).


Symbols in toolbar cannot be removed, something with “increase” und “decreaseIndent”

To remove controls/groups in toolbar you could use

webRec.removeElements([‘id1’, ‘id2’…])

The list of all available element ids inside toolbar could be retrieved by calling:

1. webRec.listStandardControlNames() – list of all standard buttons. Output:

09:19:38.928 (35) ["open", "save", "bold", "italic", "underline", "strikethrough", "subscript",
"superscript", "fontColor", "highlightColor", "undo", "redo", "fontName", "fontSize",
"indent", "outdent", "lineSpacing", "alignLeft", "alignCenter", "alignRight", "alignJustify",
"borders", "backgroundColor", "paragraphProperties", "editTabStops", "breaks",
"pageColor", "pageProperties", "insertTable", "showFormattingCharacters", "hyphenation",
"spellcheck", "locale", "bulletedList", "numberedList"]

2. webRec.listStandardGroupNames() – list of standard button groups. Output:

09:25:24.185
(10) ["fileOptions", "fontStyleOptions", "undoRedoOptions", "fontFaceOptions", "listOptions",
"paragraphOptions", "breakingSymbolsOptions", "sectionOptions", "tableOptions", "miscOptions"]

To remove controls from context menu, you could use:

webRec.removeControlsInContextMenu([‘id1’, ‘id2’…])

The list of all available ids inside context menu could be retrieved by calling:

webRec.listControlsInContextMenu(), Output:

09:21:35.805 (19) ["open", "save", "undo", "redo", "increaseIndent", "decreaseIndent",
"restartNumbering", "continueNumbering", "font", "paragraph", "page", "insertRowAbove",
"insertRowBelow", "insertColumnLeft", "insertColumnRight", "deleteRows",
"deleteColumns", "tableProperties", "license"]