Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to convert back to HTML #4

Open
bahmutov opened this issue Dec 23, 2015 · 7 comments
Open

How to convert back to HTML #4

bahmutov opened this issue Dec 23, 2015 · 7 comments

Comments

@bahmutov
Copy link

Hi, great library, using it quickly parse HTML, is there a utility method that can convert modified tree back to HTML?

@ashi009
Copy link
Owner

ashi009 commented Dec 24, 2015

I'm afraid it's not supported yet. However you could easily implement one by refering to https://github.com/ashi009/node-fast-html-parser/blob/master/index.js#L117.

@taoqf
Copy link

taoqf commented Jun 13, 2017

It will be so kind if @ashi009 could provide one. I need this too.

@taoqf
Copy link

taoqf commented Jun 14, 2017

If anyone wants to convert back to string, see node-html-parser

@felipenmoura
Copy link

@taoqf I changed some attributes and...the outterHTML has not changed...any idea why?

@taoqf
Copy link

taoqf commented Feb 24, 2018

@felipenmoura You mean in node-html-parser? I did not do much about attributes except query. maybe it will be slower after converting to html if attributes changes, so i suggest you use other module, like browser-env

@jywarren
Copy link

jywarren commented Mar 5, 2019

Hi @taoqf I am trying to use node-html-parser so i can use outerHTML, but am getting some mysterious errors -- publiclab/inline-markdown-editor#52 and https://travis-ci.org/publiclab/inline-markdown-editor/jobs/502286448 -- that didn't occur with fast-html-parser. Am I doing something wrong in how I'm including it there?

@jywarren
Copy link

jywarren commented Mar 5, 2019

Noting that it works fine in a browser, it just fails our Jasmine tests. Any help appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants