[TWC] A problem with HTMLFormattingPlugin

54 views
Skip to first unread message

blackHole

unread,
Apr 30, 2017, 12:26:47 PM4/30/17
to TiddlyWiki

Hi !

I have installed HTMLFormattingPlugin from http://www.TiddlyTools.com/#HTMLFormattingPlugin .
It works fine indeed, but I see an unexpected behaviour, probably because of a misunderstanding of mine.

A tiddler containig


    <HTML>
    <table>
    <tr>
    <th>Month</th>
    <th>Savings</th>
    </tr>
    <tr>
    <td>January</td>
    <td>$100</td>
    </tr>
    </table>
    </HTML>

when the plugin is disabed looks like

and like, instead, when it is enabled this way

Please, can you suggest a solution ?


Have a great day !

Auto Generated Inline Image 1
Auto Generated Inline Image 2

whatever

unread,
Apr 30, 2017, 1:28:09 PM4/30/17
to TiddlyWiki
Hi!
The issues is with line breaks. This is from the HTMLFormattingPluginInfo:

"Even though you can use HTML tags within your tiddler content, the default treatment for line breaks still follows the Wiki-style rule (i.e., all new lines are displayed as-is). When adding HTML content to a tiddler (especially if you cut-and-paste it from another web page), you should take care to avoid adding extra line breaks to the text."

Just remove the line breaks between the HTML tags and it will be fine.

w

blackHole

unread,
Apr 30, 2017, 2:10:09 PM4/30/17
to TiddlyWiki
Thanks for the reply ! I should have read more carefully. My fault.

Eric Shulman

unread,
Apr 30, 2017, 2:31:44 PM4/30/17
to TiddlyWiki
On Sunday, April 30, 2017 at 10:28:09 AM UTC-7, whatever wrote:
Hi!
The issues is with line breaks. This is from the HTMLFormattingPluginInfo:

"Even though you can use HTML tags within your tiddler content, the default treatment for line breaks still follows the Wiki-style rule (i.e., all new lines are displayed as-is). When adding HTML content to a tiddler (especially if you cut-and-paste it from another web page), you should take care to avoid adding extra line breaks to the text."

Just remove the line breaks between the HTML tags and it will be fine.

Rather than removing the line breaks (which makes the code less readable), you can simply embed PSEUDO-HTML "<hide linebreaks>" within the HTML block, as per documentation:

If removing all the extra line breaks from your HTML content would be a big hassle, you can quickly override the default Wiki-style line break rule so that the line breaks use the standard HTML rules, by placing <hide linebreaks> anywhere within the HTML content. This automatically converts all line breaks to spaces before rendering the content, so that the literal line breaks will be processed as simple word-breaks instead.

Thus:

    <HTML> 

    <hide linebreaks>    

    <table>
    <tr>
    <th>Month</th>
    <th>Savings</th>
    </tr>
    <tr>
    <td>January</td>
    <td>$100</td>
    </tr>
    </table>
    </HTML>


enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas" (tm)
InsideTiddlyWiki: The Missing Manuals 

whatever

unread,
Apr 30, 2017, 2:47:58 PM4/30/17
to TiddlyWiki
Lol, silly me, that was literally the next paragraph.:D I forgot about that.
w
Reply all
Reply to author
Forward
0 new messages