Coder Social home page Coder Social logo

sandglaz / bootstrap-tagautocomplete Goto Github PK

View Code? Open in Web Editor NEW
349.0 349.0 77.0 303 KB

A bootstrap plugin to autocomplete tags for contenteditable div elements. It works in the same way tagging people on Facebook, Twitter or Sandglaz works.

Home Page: http://sandglaz.github.com/bootstrap-tagautocomplete/

HTML 100.00%

bootstrap-tagautocomplete's People

Contributors

nadaaldahleh avatar simonsandglaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootstrap-tagautocomplete's Issues

WIll it work with form inputs?

I'm trying to get this to work with standard text input fields, but with no joy.... Does this work only with contenteditable divs?

My next step will be to get this working with an AJAX call with a JSON response.... Is that going to be impossible?!

Thanks!

issue with menu position

When i try to use this plugin in a modal, the menu is not showing in the correct position. I think this is caused by

show: function () {

  var pos = this.$element.position();
  var height = this.$element[0].offsetHeight;

  this.$menu
    .appendTo('body') 
    .show()
    .css({
      position: "absolute",
      top: pos.top + height + "px",
      left: pos.left + "px"
    });

  this.shown = true
  return this

}

in the show function it appends the menu to body (??)
it is originally

.insertAfter(this.$element)

in typeahead plugin. In my tests changing that line fixes the incorrect positioning problem of the menu

Inconsistent cursor placement on Bootstrap Tag Autocomplete demo

Just tried the demo in Chrome Version 25.0.1364.172
http://sandglaz.github.com/bootstrap-tagautocomplete/

It seems that cursor is placed differently after autocomplete is complete. It depends on the line number where user is typing:
First line will insert a tag, add a space after the tag and place a cursor after
Second line will insert the tag and then place a cursor right after the word
Third line will insert the tag and then place a cursor one character before the word end
....
And so forth

-- Screenshots attached
Screen Shot 2013-03-27 at 12 19 52 PM

Screen Shot 2013-03-27 at 12 22 01 PM

Screen Shot 2013-03-27 at 12 22 41 PM

Doesn't work with textarea

The modifications made to bootstrap-typeahead.js don't allow it to work in a textarea but only an input or contenteditable element.

Line 86 should be:

this.query = this.$element.is("input") || this.$element.is("textarea") ? this.$element.val() : this.$element.text();

JSON source

Hi!

I'm trying to add a JSON source to the autocomplete without success :(

Is it possible?

$('div#news').tagautocomplete({
source: function (query, process) {
return $.get(SITE_URL+'board/async/get_users.php', { term: query, k: 1 }, function (data) {
return process(data);
});
},
character: '@'
});

2nd line

Can not start a tag as the first character after line one. Issue happens in IE, FF, Chrome.

on new line(enter key) mention list will not display

Hello,

We have seen your demo and it works fine but the only problem we faced was when we type any word (without space) and press enter key then after that we can not get user mention list but instead we type word and give space and then press enter key then it will work fine.

So the conclusion is we require space to get mention.

Can you please help me out in this issue.

Thanks

doesn't work in IE 11.0

Doesn't work in IE 11.

The issue is that splitText method on text node element does not split the node.
Using splitDataNode can fix the issue though but it seems to be slowing down the selection.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.