diff --git a/examples/typeahead2.html b/examples/typeahead2.html index 864edad..9fe33ed 100644 --- a/examples/typeahead2.html +++ b/examples/typeahead2.html @@ -26,7 +26,7 @@ angular.module('typeahead', ['ui.bootstrap', 'radians'])
Model: {{ selected | json }}
-
+
diff --git a/src/radians/contenteditable.coffee b/src/radians/contenteditable.coffee index d203f15..149fd87 100644 --- a/src/radians/contenteditable.coffee +++ b/src/radians/contenteditable.coffee @@ -24,3 +24,9 @@ angular.module('radians.contenteditable', []) .filter('typeaheadHighlight', -> (matchItem, query) -> matchItem ) +.filter('ignoreImgFilter', -> + noImg = (s) -> s.replace(/]*>/, '') + (items, query) -> + item for item in items \ + when noImg(item).match(new RegExp(noImg(query), 'gi')) +)