Comments (20)
Are you using relative links? Can you try absolute ones?
from atom-html-preview.
i canβt in this case, I was working with a local file. it looks like remote ones from a CDN are working, though.
On Apr 18, 2014, at 7:26 PM, Fatih Kadir AKIN [email protected] wrote:
Are you using relative links? Can you try absolute ones?
β
Reply to this email directly or view it on GitHub.
from atom-html-preview.
Ok, I will work on it π
from atom-html-preview.
π
from atom-html-preview.
Have the same Problem, worked from a local directory with a css file in it and linked in the html.
css is ignored.
[ Manjaro, Atom 0.94, Html Preview 0.1.3 ]
from atom-html-preview.
Yup me too. Atom 0.94. Working for remote css but not local css.
from atom-html-preview.
Same issue. Local included css/js doesn't work. (Atom 0.100)
from atom-html-preview.
Same problem here. Does not load images/css.
from atom-html-preview.
Same here, no local css.
from atom-html-preview.
Same issue, Atom 0.115. Is any fix coming for this soon?
from atom-html-preview.
After some tinkering I did get local stylesheets and script files to work.
I had to set the sandbox attribute on the IFRAME, and the way source is set.
I used a local filepath as SRC attribute, instead of the data:text/html;charset=utf8, ...
.
In the package source file atom-html-preview-view.coffee I changed the line
iframe.src = "data:text/html;charset=utf-8,#{encodeURI(text)}"
to
iframe.setAttribute("sandbox", "allow-scripts allow-same-origin")
iframe.src = @getPath()
Changing the source package yourself is pretty easy, while we wait for a update :-)
This pull electron/electron#208 has more info.
from atom-html-preview.
I can confirm that @kwaak 's resolution appears to be working. I will continue using it to verify.
from atom-html-preview.
I just used @kwaak suggestion and it works perfectly! Thanks! Now preview shows html+css.
from atom-html-preview.
Thanks @kwaak. It works now like a charm.
from atom-html-preview.
@kwaak solved similar problem I had with images not displaying
from atom-html-preview.
Thanks @kwaak it works now, any way to have this implemented in the package as well?
from atom-html-preview.
@kwaak 's solution isn't working for me. Any suggestions?
from atom-html-preview.
This doesn't work for me. CSS isn't showing up in Atom, but works fine in Chrome. My link tag is in the html document header and looks like this: <link rel="stylesheet" href="./assets/css/default.css">
from atom-html-preview.
Works so great, thanks!
from atom-html-preview.
@kwaak please explain in more details how to fix the issue, Sorry, I'm a beginner so I didn't get what exactly should I do to make Atom Preview read css commends as well. really-Really rely on your help
from atom-html-preview.
Related Issues (20)
- Does not work with .php files HOT 3
- Is there away to add the google chrome extension html box highlighter known as "Pesticides for Chrome" feature into the atom html preview package? HOT 3
- Won't install on windows 10, atom 1.51.1
- Preview crashes after string function
- Console? HOT 2
- Atom tries to download a PDF link on each refresh
- Rotates background-image
- Is There a Place to Set the Root Directory for the Website Project? HOT 1
- htm;
- atom html preview is not working. HOT 6
- No Geolocation
- not showing the css file effect
- Flexbox Gap Styling Not Displaying HOT 2
- Failed to activate the atom-html-preview package
- HTMLDocument.registerElement is deprecated. HOT 2
- Installation Error
- installation automatically stops after sometime
- Close All Windows will not close Preview window(s)
- Installation error.
- how do i install it from github like this page?
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 atom-html-preview.