Prawn html formatting

2019-05-08 09:43发布

问题:

I have some simple lists and bold/italic text to format with prawn. How do I get prawn to pay attention to the html tags instead of just displaying them explicitly.

If prawn can't do this, what are my other options?

回答1:

Inline formatting has been completely re-instated in the development version of Prawn.

You can use the code off of the stable branch (0.9.x) for stability, or track master, where we just merged inline styling support for tables. See notes at:

http://wiki.github.com/sandal/prawn/changelog-dev



回答2:

According to the Prawn changelog:

We had planned to write up the necessary steps for getting prawn-format back into the fold, but instead, we are working on a replacement that will be supported in core. More details to come soon.

You might want to create an issue on their github page to find out the roadmap for this feature.



回答3:

There was http://github.com/sandal/prawn-format for this, but now it is out of date and not supported.

As of Prawn 0.7, prawn-format is completely unsupported, and will not work with versions of Prawn 0.7+. Feel free to fork and fix, of course.