Comments (7)
Hello,
Do you have an example to pass cherio options to the inky() function? I can't make it work.
Thanks!
from inky.
Yes, use it like this with gulp/vinyl (inky from the master branch):
vfs.src('somefile.html')
.pipe(inky({cheerio: {decodeEntities: false}}))
.pipe(vfs.dest('output'))
somefile.html
:
"mytext"
output:
"mytext"
So, the options are actually passed to cheerio.load(input, opts)
, but entities ("
) go missing in the final output (after releaseTheKraken().html()
... guess that happens in componentFactory.js
from inky.
I was able to drill down the issue
this input results in decoded entities for the text "broken"
.. output "broken""
despite passing {decodeEntities: false}
. "works" is outputted as "works"
(since its outside the <center>
tag ?).
<table class="body">
<tr>
<td class="center" align="center" valign="top">
<center>
"broken"
</center>
"works"
</td>
</tr>
</table>
putting an attribute data-parsed
on the <center>
tag works for both texts. inside and outside the center tag, output is "works"
<table class="body">
<tr>
<td class="center" align="center" valign="top">
<center data-parsed>
"works"
</center>
"works"
</td>
</tr>
</table>
from inky.
Thanks for the update!
But I have a doub't: I have installed Inky using NPM (https://www.npmjs.com/package/inky).
I'm using Gulp to compile the files, and if I pass the cheerio options to Inky, for example:
.pipe(inky({cheerio: {decodeEntities: false}}))
It won't work.
This feature works ok from the NPM version?
Thanks!
from inky.
No, the feature was introduced here 9fda83e#diff-168726dbe96b3ce427e7fedce31bb0bc and is included in the master branch ...
try npm install github:zurb/inky#master
to get it
from inky.
Ok, thanks for your help! :)
from inky.
@dherges @ibarral Just published the Foundation for Emails 2.1 release blog post and the release went out this morning! We also started a discussion on the future of Inky and what amazing integrations can be made. I'm sure you have some comments, questions, or ideas: http://foundation.zurb.com/forum/posts/39717-architecting-the-future-of-foundation-for-emails
from inky.
Related Issues (20)
- Spacer not working - outlook does not recognize px on td HOT 1
- <th> vs <td> in rows
- failing CI
- <raw> tags don't support multi-line html HOT 4
- Button custom attributes not retained HOT 1
- Source Ordering in Inky - Is It Possible? HOT 1
- Responsive Spacers break after running build
- Slinky playground not producing output from CodePen HOT 3
- Unable to use inky programmatic mode in web.
- Vulnerability in vinyl-fs used version HOT 4
- ‍ appending after each row HOT 1
- update CI setup HOT 1
- Npm audit issues with cheerio package in inky HOT 1
- RFC 2822 - 1000 characters limit per line - Inky removes line breaks before tags
- Link of site on github is down
- Regression: <spacer> no longer including extra attributes
- `<h-line>` should output a `<tbody>`
- `<h-line>` stops all further output
- Passing inline styles down from an Inky component causes sass styles to be overwritten
- if condition on html with less than condition
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 inky.