Comments (7)
To help me understand, please, could you give me an example of what you're trying to do?
Have you seen this documentation? It includes an example to inject HTML into an output cell.
from ijavascript.
Not sure whether this may help you: a kernel spec may include custom.css
and custom.js
. See IPEP25.
from ijavascript.
Thanks for the quick response!
I don't know how it is possible but I have overlooked the documentation. I guess the $$html$$
could perhaps work though CSS styles should be inside <head>
, which this doesn't enable.
What I am trying to achieve: I have this notebook that I use with RISE to produce live presentation slides. I would like to center the 2nd line, i.e. "Jakub Holý - Iterate conference 8/2015". So I want to have either
.my-centered { text-align: center }
// And later, on the slide/cell:
<p class="my-centered">Jakub Holý - Iterate conference 8/2015</p>
(using a class rather then style so that I can use it on multiple elements) or just this
.text_cell_render p { text-align: center }
The question is where to put it.
Regarding custom.(css|js)
, I think those would only be useful if they could be in the notebook directory, i.e. for that notebook, not all.
Thank you!
from ijavascript.
This should do the trick using IJavascript:
$$html$$ = '<script>document.styleSheets[0].insertRule(".rendered_html .my-centered { text-align: center; }", 0);</script>';
But I would also ask this question on the Jupyter mailing list. There may be a recommended way to add a custom.css
to a notebook.
from ijavascript.
This message from the mailing list may be relevant:
https://groups.google.com/d/msg/jupyter/Hak-Xjwro3k/_NznabngCwAJ
from ijavascript.
@jakubholynet I'm closing this issue. If the comments above don't help, please, feel free to reopen this issue.
from ijavascript.
Thank you!
from ijavascript.
Related Issues (20)
- Install ijavascript in Windows without Visual Studio HOT 9
- Give a documented dependency install on Linux (ubuntu) HOT 13
- Can't output separate charts HOT 9
- [requirejs] Unable to load library with Jupyter Notebook HOT 5
- Thoughts on how to run iJavaScript on mybinder? HOT 4
- No output when using %%javascript magic HOT 2
- Unable to run in Ubuntu WSL2 Visual Studio Code (`spawn ijskernel ENOENT`) HOT 2
- import / require statements break vscode code analysis HOT 2
- IJavaScript stopped working after upgrading the major version of node.js HOT 2
- Jupyter notebook (and Jupyter lab too) gives error when loading d3 library HOT 2
- Updated NVM version, got error "no such file or directory" ".../bin/node" HOT 2
- Add a rebuild command
- jupyterlite Support
- Java script kernel stops working in Jupyter Lab HOT 3
- Is it still maintained HOT 4
- Cant install ijavascript (npm ERR! enoent spawn C:\Windows\system32\cmd.exe ENOENT) HOT 2
- ijsinstall: not working due to wrong use of ipython --user HOT 5
- SyntaxError: Cannot use import statement outside a module HOT 2
- install failed due to zeromq (Node v21) HOT 1
- npm install fails on macos Sonoma 14.4.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ijavascript.