How to remove <p></p> from <$view tiddler="1111" field="text" format="htmlwikified"/> ?

77 views
Skip to first unread message

Siniy-Kit

unread,
Jan 3, 2020, 10:41:35 AM1/3/20
to TiddlyWiki
Hi! I open empty Tiddlywiki and create new tiddler '1111'  with text <div> My div</div>
then I create new tiddler with text  <$view tiddler="1111" field="text" format="htmlwikified"/>  and see this result

<p><div> My div</div></p>   

How to remove <p></p> from this result?

TonyM

unread,
Jan 3, 2020, 7:51:44 PM1/3/20
to TiddlyWiki
Siniy,

What about simply retrieving the text and wrapping it again with the div? 

or perhaps treat it as a template?

{{||1111}}

Just some thoughts although I do not know how to hide the <p> I think it comes from the render process.

Regards
Tony

Jeremy Ruston

unread,
Jan 5, 2020, 8:18:32 AM1/5/20
to tiddl...@googlegroups.com
Hi Siniy-Kit
The view widget “htmlwikified” format parses the target text in block mode which means that it generates paragraph tags, and recognise headings and tables and other block level formatting.

To work around it, you’d need to use the wikify widget along with the “mode” attribute. For example:

<$wikify name="output" text={{1111}} mode="inline">
<$text text=<<output>>/>
</$wikify>

Best wishes

Jeremy.



--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/6da5195b-2358-42c8-82d9-5e16e7234e87%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages