mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-28 02:50:27 +00:00
06a0d21734
Fixes #82. The old behaviour was to parse the content of a widget or html element in block mode if the opening tag was followed by a line break. The new behaviour requires two line breaks. This makes it possible to include linebreaks more liberally within wikitext, although care must still be taken to only use double line breaks when the block mode behaviour is desired. The code change here is very simple, just a single line change in html.js. Most of the other changes are to convert various single line breaks into double line breaks.
34 lines
943 B
Plaintext
34 lines
943 B
Plaintext
created: 20131205160816081
|
|
modified: 20140220203440064
|
|
tags: wikitext
|
|
title: HTML in WikiText
|
|
type: text/vnd.tiddlywiki
|
|
|
|
HTML tags and comments can be used directly in WikiText. For example:
|
|
|
|
```
|
|
<article class="hello">
|
|
This is my nice and simple block of text. HelloThere
|
|
<!-- This comment will not appear in the wikified output -->
|
|
</article>
|
|
```
|
|
|
|
! Attributes
|
|
|
|
Attributes in HTML tags can be specified as a transclusion or a macro invocation. For example, here the value of the `href` attribute will be set to the value of the tiddler MyLinkDestination:
|
|
|
|
```
|
|
<a href={{MyLinkDestination}}>link</a>
|
|
```
|
|
|
|
Here an attribute is specified as a macro invocation:
|
|
|
|
```
|
|
<a href=<<MyMacro "Brian">>>link</a>
|
|
```
|
|
|
|
! Content Parsing
|
|
|
|
The content of an HTML element will be parsed in inline mode unless the opening tag is followed by two linebreaks. (Inline mode means that block mode formatting such as tables, lists and headings is not recognised).
|
|
|