Skip to content

Tag: javascript

Regex for numbers with spaces and + sign in front

If i want to accept only numbers then i will use this regex but the problem here is that the numbers like +1 00 are not catched and my regex will show that it is invalid The user needs to type only numbers but only one space in between is allowed and + sign at the beggining should be optional.

Electron, contextIsolation and contextBridge

I recently had to revamp an old Electron app. I found out that it had contextIsolation set to false, so I went ahead and set it to true (and btw set nodeIntegration to false). As expected, it broke the ipc communications So I used, as advised in many places, a preload script that enables some communications c…

Change language in Roomle Configurator

I use the following code to instantiate the Roomle Configurator on my website: By default the configurator always uses the default browser language. Is it possible to change that? Answer It’s possible to use the locale url param to set the language. Here is a list with all available languages: https://w…

Ag-grid conditional formatting

Is it possible using the framework ag-grid in JS to apply a conditional background color formatting of a cell based on its value such as Excel conditional formatting (eg the second table formatting in this link is a great example of what I am trying to achieve). Basically, cells containing the highest values …