$rc = "<i><b data-toggle=\"tooltip\" data-placement=\"top\" title=\"$info\">$text</b></i>";
break;
case 'mark':
- $rc = '<span class="lkn-text-' . substr($matches[3], 1) .'">' . $matches[2] . '</span>';
+ $rc = '<span class="lkn-text-' . substr($matches[3], 1) . '">' . $matches[2] . '</span>';
break;
case 'add':
$rc = '<ins class="lkn-ins">' . (count($matches) == 4 ? ($matches[2] . $matches[3]) : $matches[2]) . '</ins>';
$name = $matches[2];
$value = '';
$size = 8;
- if (count($matches) > 3){
+ if (count($matches) > 3) {
$parts = explode('|', substr($matches[3], 1));
$value = $parts[0];
- if (count($parts) > 1){
+ if (count($parts) > 1) {
$size = $parts[1];
}
}
$rc = "<input class=\"lkn-field\" name=\"$name\" value=\"$value\" size=\"$size\">";
break;
+ case 'icon':
+ $name = $matches[2];
+ $size = count($matches) < 4 ? 0 : intval(substr($matches[3], 1));
+ $class = $size == 0 ? '' : "lkn-icon-$size";
+ $rc = "<i class=\"$name $class\"></i>";
+ break;
+ case 'image':
+ $name = $matches[2];
+ $size = count($matches) < 4 ? null : $matches[3]);
+ $class = $size == 0 ? '' : "lkn-icon-$size";
+ $rc = "<img class=\"$name $class\"></i>";
+ break;
default:
$rc = $matches[0];
break;