function xbbcode_list_autocomplete in Extensible BBCode 5
Same name and namespace in other branches
- 8 xbbcode_list/xbbcode_list.module \xbbcode_list_autocomplete()
- 6 xbbcode_list/xbbcode_list.module \xbbcode_list_autocomplete()
- 7 xbbcode_list/xbbcode_list.module \xbbcode_list_autocomplete()
1 string reference to 'xbbcode_list_autocomplete'
- xbbcode_list_menu in xbbcode_list/
xbbcode_list.module
File
- xbbcode_list/
xbbcode_list.module, line 192
Code
function xbbcode_list_autocomplete($type, $string) {
if ($type == 'ol') {
$styles = array(
'upper-alpha',
'lower-alpha',
'upper-roman',
'lower-roman',
'numeric',
);
}
else {
$styles = array();
}
$string = check_plain($string);
foreach ($styles as $style) {
if (preg_match("/^{$string}/", $style)) {
$results[$style] = $style;
}
}
print drupal_to_js($results);
exit;
}