Open hidakatsuya opened 10 years ago
I ended up monkey-patching the text_box method in my rails app. It's a terrible approach but at least it got the job done for now.
Inline format works as expected except for the fact that links are not clickable when you use them inside a list for some reason.
Thank you for your advice.
My implementation for this feature is almost the same as your. Also inline format is enabled by thinreports/thinreports-editor#12.
I think that a problem that links are not clickable is probably caused by prawn's bug (or specification). So i have reported the issue to prawnpdf/prawn#801.
The Inline link wont't supports.
We will support a part in this version as below:
Format | TextBlock in global | TextBlock in List | Text |
---|---|---|---|
<b> |
Yes | Yes | Yes |
<i> |
Yes | Yes | Yes |
<u> |
Yes | Yes | Yes |
<strikethrough> |
Yes | Yes | Yes |
<sub> |
Yes | Yes | Yes |
<sup> |
Yes | Yes | Yes |
<font> |
Yes | Yes | Yes |
<color> |
Yes | Yes | Yes |
<link> |
Yes | No | No |
We have desided that we don't fix this feature in v0.8. Becase following cases don't work:
<font name="IPAMincho"><b>日本語</b></font>
<link href="http://www.example.com">link</link>
So, we will move the feature to v1.0.0 milestone.
This feature will be implemented in 1.0.0, because prawnpdf/prawn#801 have been fixed in prawn 2.0.1.
Can this be merged back? It seems prawn issue is fixed.
Can this be merged back? It seems prawn issue is fixed.
Yes, we will try to merge it in v1.0.0.
@elshaka Can you provide a new link to your workaround for this?
Thanks!
@willjohnson here ! It's an old monkey patch, you should check if it still does the job, I'm not using it right now.
Any eta for 1.0.0 ?
@mukuls-brdsys
Any eta for 1.0.0 ?
The specific release schedule is undecided.
Prawn's inline formatting: http://rubydoc.info/gems/prawn/0.12.0/Prawn/Text:text
Support formats:
<b>bold</b>
<i>italic</i>
<u>underline</u>
<strikethrough>strikethrough</strikethrough>
<superscript>super</superscript>
,<subscript>sub</subscript>
<font size="24">font style</font>
<color rgb="#ff0000">color</color>
<link href="http://www.thinreports.org">thinreports.org</link>
Support table:
<b>
<i>
<u>
<strikethrough>
<sub>
<sup>
<font>
<color>
<link>
Example:
=> ThinReports official site is thinreports.org.