til-schneider / slim-wiki

A slim wiki based on PHP and markdown
MIT License
13 stars 7 forks source link

Add Note Syntax #5

Closed fragmentbyte closed 8 years ago

fragmentbyte commented 8 years ago

It would be cool to add blocks of notes.

For example - https://www.dokuwiki.org/plugin:note

til-schneider commented 8 years ago

I want to keep slim wiki using Markdown. And in Markdown there is no such thing like notes.

But you can just write normal HTML in Markdown. Like this you can create your own notes.

Just define some CSS like this:

.note {
    background: yellow url(icon-note.png) no-repeat 10px center;
    padding: 10px 10px 10px 40px;
    border-radius: 10px;
}

Then you can add notes in your Markdown like this:

<div class="note">Here goes my note</div>
fragmentbyte commented 8 years ago

Yes, I did. But in div markdown does not work and you need use HTML. It is not comfortable. You can do both with FIXME and TODO?

til-schneider commented 8 years ago

You could also style blockquotes to look like notes.

til-schneider commented 8 years ago

Markdown in HTML tags is only forbidden for block elements like <div>, <table>, <pre> or <p>.

So you could use an inline element like <span>, <cite>, oder <del> and give it display: block using CSS. In these elements Markdown syntax will be translated.