CSS not working in PaxWeb Http Whiteboard - pax-web

I am using PaxWeb Http Whiteboard service in Apache Karaf; while everything works, I am unable to get certain CSS styles rendered properly -
for example,
arrow-dropup-circle {
content: "\f364";
}
This is supposed to display a drop up circle but when hosted in PaxWeb, though the css is loaded; it does not render the content. While it displays square boxes in chrome, in firefox; it just shows the number f364 in a square box.
Please note that this works when I host my website in NodeJS.
My blueprint is same as the one given here.
Can someone shed some light into why am not getting css rendered properly?
Thanks
Venkatesh Laguduva

I had a same issue. In my case, font files (like .ttf, .woff) were failed to decode while loading the page. Maven was corrupting that. It is filtering files with those extensions. To exclude files from filtering based on the extension, we can use "nonFilteredFileExtensions" tag in pom. This solved my decoding issue.

Related

How to use image upload adapters as extra plugins with CKEditor 5 Classic Editor? Or, how to use CKEditor custom builder in React JS?

I was trying to integrate CKEditor5 in my MERN Stack Application. Its a kind of blog site which requires a fully functioned rich text editor. I integrated the editor and all other things are working fine except the file upload button.
I am using the predefined Classic Editor, which has all the basic functions. But when I click on the Image button to upload an image from local storage, it shows the error :
filerepository-no-upload-adapter
I tried to add Base64UploadAdapter plugin but then it shows the error :
Uncaught CKEditorError: ckeditor-duplicated-modules
Because of this error, I had to remove that plugin, but I still do not have the file upload function.
I also need some other buttons on my text editor, but I am always getting some kind of errors.
I also tried the CKEditor Custom build editor, but when I imported it to my page, it again gives me ckeditor-duplicated-modules error. I used the following code for importing:
import { CKEditor } from '#ckeditor/ckeditor5-react';
import Editor from 'ckeditor5-custom-build/build/ckeditor';
And yes, I also added the custom builder's folder to my package.json before importing this.
I want all the features that I added in my Custom builder, but that's not working in my case. Can anyone please help me with this? Or else, if that is not possible, please give me a solution for file upload which I need for sure, even if I don't get other buttons except the predefined Classic Editor buttons.
But, if there is any way to fix this ckeditor-duplicated-modules error and use the Custom build only, that would be the best solution for me..!
Thanks in advance.

How to create a ReactJS zoomable image lightbox

I'm creating a gallery of images in ReactJs. There are a lot of examples online, but i didn't find anything that is perfectly responsive on desktop browsers and also completely mobile friendly.
In particular, when an image is opened on the mobile browser, i need to be able to zoom the photo with a double tap, and close the photo when i drag it to the bottom
I already tried all the principal solution that i found online.
For example, i tried all of these https://reactjsexample.com/tag/lightbox/
and much much more.
I also tried different approaches like CSS rules, Viewport rules, create a simple zoomable html div, etc... But nothing worked.
Basically, what i what to achieve is exactly something like this: https://www.lucapetruzzi.com/gallery/1
Created thanks to this library: https://photoswipe.com/ that unfortunately i can't use in React.
(I also tried the react-photoswipe and react-photoswipe-2 libraries but it seems not maintained and not working with new versions of React)
Thank you for any help
So for previous comments, I wrote a snippet for you, check here
Here are the mainly steps:
use npm install photoswipe so DON'T need to include builded js but NEED to include css in index.html (or you can import in App.css)
write the markup in js component
init it by click button or in useEffect

correct way to add js in sencha architect (ExtJS)?

This thread works well in a mobile app but in a desktop app it would seem I cant add the reference to the external JS in an extjs desktop app.
The instructions from Sencha somehow don't correspond or it doesn't work for me when I try and follow them. So, I am selecting Resources->Library and can see the attribute Include JavaScript (ticked) and Library Base Path:/ext.
The JS file I am using I use in a phone app and its fine - I added it to the app.json in that and compiling the app copies the file over to the target and defers the loading.
In this case with SA I am not seeing the file copied to the target - nor can I follow the instructions with SA 3 that are documented. The only way I can add an external JS is by dropping it onto the filesystem into the ext folder manually. Again, it doesn't appear in the target and certainly errors when I run the app with
Uncaught ReferenceError: hex_sha512 is not defined
This JS has been used in other apps, is proved and tested but just relates to SA or my wrong use of SA.
The proper way to add a resource in Sencha Architect, regardless of framework, is to add it as a JS resource.
This is most easily done by hitting ctrl-t (or cmd-t on a mac) and typing "js resource" (or some shortened string thereof to get autocompletion)...
Alternatively, you can use the toolbox, click "Resources", and drag out or double click "JS Resource"
These are just different user interfaces to accomplish the same task.
Once you've added your JS resource using one of the above methods, you need to set the URL in the config pane (at bottom right unless you've configured Architect to swap the left and right panes)...
The URL is to be set relative to your project folder. If you copy the JS file into your project root under a folder called "lib" for example, then you'd set the url config to "lib/foo.js" - where foo.js is the filename, of course.
Hope that helps!
My lack of understanding of the instructions or they are not clear:
It would seem the way to do it is take eyes up to the top right of SA and spot the + button as shown in the image.
Add the JS resource and scroll up because it may be hidden behind the property inspector.
On setting the url field under properties, the source of the JS appears in the main editing window.
Certainly works fine after the app is built.

How to completely hide the ExtJS Source Code in browsers inspect element?

I have an EXTJS app and when I look at the source by using browser's inspect element I can see my entire app's source code (except for the server-side code ofcourse.).
I have seen some extjs apps that when inspecting theie source code, all I can see is the app.html page and non of their .js files is discover able by the browser.
I was wondering how I should configure my EXTJS app to make them not viewable inside the browsers "Sources" tab (ie. Chrome's Inspect Element > Sources).
Any help is much appreciated,
The best you can do is to obfuscate your code, as there is no way to stop someone looking at it once its got to the browser.
Even if the browser could hide it somehow, there is nothing stopping a user sniffing the packets on the network etc.

Drupal fb Like Box Css

Im making a website using Drupal 7.
I just installed the 'Social Media' and 'Widgets' Modules.
Then I added the fb like box to the left sidebar region of my danblog theme.
As you can see the box overflows the block.
Can I solve it by some configuration or do I need to change the css manually?
I wanted to know where exactly can I find the CSS of these blocks so that I could try to change it?
There are so many .php files and some .css files in drupal.
If someone could please elaborate on some technique or some basic understanding by which I can find the styling of blocks in those php files as I assume they may not be in seperate .css files
Thanks
Quick fix not recommended:
#f3c805688 { width: 220px!important; }
You really don't want to use !important it works as a quick fix in this case, but the ideal fix would be to change the height of the iFrame before inserting it into the page via some backend interface. Does the social media module have an option to change the width?

Resources