SORU
29 HAZİRAN 2009, PAZARTESİ


Paragraf bir fiyat indirimi kullanarak bir sınıf adı tanımlayabilir miyim?

Paragraf bir fiyat indirimi kullanarak bir sınıf adı tanımlayabilir miyim? Eğer öyleyse, nasıl?

CEVAP
29 HAZİRAN 2009, PAZARTESİ


Eğer: How do I set an HTML class attribute in Markdown?

< / ^ hr .

Doğal olarak? Hayır. Ama...

Hayır, fiyat indirme sözdizimi. Ekstra fiyat indirimi ile birlikte set ID values.

Eğer istersen 12 ** ve öznitelik markdown="1" fiyat indirme-dönüştürme HTML öğesi içinde devam etmek için ekleyin. Bu se Markdown Extra gerektirir.

<p class='specialParagraph' markdown='1'>
**Another paragraph** which allows *Markdown* within it.
</p>

Olası Çözüm: (<blockquote> Denenmemiş amaçlanan)

Aşağıdaki internetten buldum:

İşlevi

function _DoBlockQuotes_callback($matches) {

    ...cut...

    //add id and class details...
    $id = $class = '';
    if(preg_match_all('/\{(?:([#.][-_:a-zA-Z0-9 ] ) )\}/',$bq,$matches)) {
        foreach ($matches[1] as $match) {
            if($match[0]=='#') $type = 'id';
            else $type = 'class';
            ${$type} = ' '.$type.'="'.trim($match,'.# ').'"';
        }
        foreach ($matches[0] as $match) {
            $bq = str_replace($match,'',$bq);
        }
    }

    return _HashBlock(
        "<blockquote{$id}{$class}>\n$bq\n</blockquote>"
    ) . "\n\n";
}

Bir fiyat indirimi

>{.className}{#id}This is the blockquote

Sonuç

<blockquote id="id" class="className">
    <p>This is the blockquote</p>
</blockquote>

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • expertvillage

    expertvillag

    5 NİSAN 2006
  • Just So

    Just So

    3 HAZİRAN 2007
  • warningthepeople

    warningthepe

    21 EYLÜL 2011