Override styles and scripts for specific page - docusaurus

Is there a way I can avoid Docusaurus from injecting styles and scripts for a specific page? I have a use case where I'd like to render a legacy html that has it's own styles / scripts, but Docusaurus's styles are colliding.

Related

Vue3 Electron app: components loaded with createSSRApp ignore styles

I have an Electron app based on Vue3 SFCs. I created a separate Vue component for printing; I load it using createSSRApp and create the HTML string to print with renderToString. It basically works, but the HTML string does not contain any of the styles defined in the print component's <style> section.
The HTML string is loaded into a new Electron BrowserWindow like this:
printWnd.loadURL("data:text/html;charset=utf-8," + encodeURI(html))
This leads me to another problem: when I try to load assets from the package, e.g. CSS or fonts, the chromium engine in Electron complains about not wanting to load them since they are being referred to from a privileged level.
How can I load styles and assets into this print HTML? Or should I try a totally different approach for printing?

Ckeditor5 styles plugin as separate buttons (not dropdown)

Is it possible to configure CKEditor5 styles plugin as separate buttons, not dropdown? I'm using the angular version.
I know it is possible for heading plugin, but I need styles plugin buttons also.

Vue including global styles without repeating the styles for each component

I have an app and would like to include some global styles that I can use anywhere in the app like this:
.btn {
...
}
In webpack I already have this for _variables.scss to include things like $my-color: $fff and that is wired up like this in my loaderOptions:
{
additionalData: `#import "#/styles/_variables.scss";`
}
Obviously for some global styles I could do the same thing, however, this will cause my styles like .btn to load as many times as components that I have.
Logically it would seem best to just go into my root Vue component and add global <style lang="scss"></style>.
However, I am upgrading a legacy jQuery app and it is being piecemealed and instead of one root app component, I have several roots for parts that have been converted to Vue. I don't have a central place to load these styles.
For instance I have searchBar and checkout apps that are instantiated using Vue.extend (so they are all part of the same instance). There aren't just two apps, there are quite a few. If I include the global styles in the root of any of them it... feels... icky...
Is there any way around this or should I set the global styles in a random app with a TODO to refactor once everything is ported over?
Ideally I would do the same thing I'm doing with the _variables.scss but having the styles duplicated for each component is a non starter for me.
In this scenario you do not need to worry about how webpacks CSS loaders are working.
You can simply go into your main.js and import '#/styles/globals.scss' to load the styles globally.

CKEditor5 styles dropdown

Sorry if this has been addressed before.
CKEditor4 provided feature of Styles dropdown where we were able to add custom CSS classes. However, I do not see this feature in CKEditor5 version.
Styles dropdown
Could someone please guide on this if there is any other way to get the Styles dropdown with CKEditor5?

Strange text in Vue.js

I am trying to develop an application using vue.js2. I am getting some strange texts in source code. You can see those texts in below image.
Could anyone say why it is coming ?
You might be using scoped attribute on styles tag in your .vue files to scope your styling to the component only.
Any styles scoped to a component using the <styles scoped> ... </styles> , the styles will be applied only to the elements in that component only.
So vue-loader which parses the .vue files uses PostCSS behind the scenes to achieve this by add adding those weird and unique data attributes.
See Scoped CSS for more info