function __construct($text, $markdown = true)
 {
     parent::__construct($text, $markdown);
     // define custom tags
     $this->addTags('wikipedia');
     $this->addAttributes('language');
 }
Ejemplo n.º 2
0
 static function get($text)
 {
     // pass the parent page if available
     if (is_object($text)) {
         self::$obj = $text->parent;
     }
     $text = preg_replace_callback('!(?=[^\\]])\\((' . implode('|', self::$tags) . '):(.*?)\\)!i', 'kirbytext::parse', $text);
     $text = preg_replace_callback('!```(.*?)```!is', 'kirbytext::code', $text);
     return $text;
 }
Ejemplo n.º 3
0
function gist($url, $file = false)
{
    $name = kirbytext::classname();
    $obj = new $name();
    return $obj->gist(array('gist' => $url, 'file' => $file));
}
Ejemplo n.º 4
0
 /**
  * Load all default extensions
  */
 public function extensions()
 {
     // load all kirby tags and field methods
     include_once __DIR__ . DS . 'extensions' . DS . 'tags.php';
     include_once __DIR__ . DS . 'extensions' . DS . 'methods.php';
     // install additional kirby tags
     kirbytext::install($this->roots->tags());
 }
 function __construct($text, $markdown = true)
 {
     parent::__construct($text, $markdown);
     $this->addTags('sublime');
     $this->addAttributes('uid', 'name');
 }
Ejemplo n.º 6
0
 /**
  * Load all default extensions
  */
 public function extensions()
 {
     // load all kirby tags and field methods
     include_once __DIR__ . DS . 'extensions' . DS . 'tags.php';
     include_once __DIR__ . DS . 'extensions' . DS . 'methods.php';
     // install additional kirby tags
     kirbytext::install($this->roots->tags());
     // install the smartypants class if enabled
     if ($this->options['smartypants']) {
         include_once __DIR__ . DS . 'vendors' . DS . 'smartypants.php';
     }
 }
Ejemplo n.º 7
0
 function __construct($text, $markdown = true)
 {
     parent::__construct($text, $markdown);
     $this->addTags('sublime');
     $this->addAttributes('poster', 'video1', 'video2');
 }
function kirbytextSans($text = '')
{
    $text = kirbytext::init($text, true);
    return preg_replace('/<p>(.*)<\\/p>/', '$1', $text);
}
 function __construct($text, $markdown = true)
 {
     parent::__construct($text, $markdown);
     $this->addTags('minigallery');
     $this->addAttributes('crop', 'quality', 'titles', 'rel', 'fancybox', 'class');
 }
Ejemplo n.º 10
0
 function __construct($text, $markdown = true)
 {
     parent::__construct($text, $markdown);
     $this->addTags('image');
     $this->addAttributes('caption');
 }
Ejemplo n.º 11
0
 protected static function tags()
 {
     // load all kirby tags
     include_once __DIR__ . DS . 'config' . DS . 'kirbytext.php';
     // install additional kirby tags
     kirbytext::install(c::$data['root.tags']);
 }
Ejemplo n.º 12
0
 function __construct($text = false, $markdown = true)
 {
     parent::__construct($text, $markdown);
     $this->addTags('resrc');
 }