Giter Site home page Giter Site logo

Comments (7)

evereq avatar evereq commented on July 27, 2024

Any news? Because right now it just drive me crazy :D To get tags that was entered, I issue following undocumented code (founded reviewing SOURCE HTML of the following page http://textextjs.com/manual/examples/tags.html ...):
var textext = $('#keywords').textext()[0];
var tags = textext.hiddenInput().val();
Should be some easy / well documented way to get entered tags, what you think??? :)

from jquery-textext.

seanodotcom avatar seanodotcom commented on July 27, 2024

+1
Simple question: How do you add TextExt tags programmatically?

On http://textextjs.com/manual/examples/tags.html I see an addTags(tags) method... but can't find the pointer to call it correctly.

from jquery-textext.

alexgorbatchev avatar alexgorbatchev commented on July 27, 2024

@seanodotcom @evereq Thanks for feedback, I released "emergency" 1.2.0 which just includes this feature, please see the demo

http://textextjs.com/manual/examples/tags-adding.html

from jquery-textext.

evereq avatar evereq commented on July 27, 2024

excellent and quick! Thanks! :)

from jquery-textext.

evereq avatar evereq commented on July 27, 2024

Side note: if you select order of plugins for example like "plugins: 'prompt focus autocomplete arrow tags'" than yes, feature works. However if you use order like 'tags prompt focus autocomplete arrow' new feature do NOT work for some reason :) Spend few minutes today to figure out this :D Seems you may need to fix it in next version ;-)

from jquery-textext.

sirvine avatar sirvine commented on July 27, 2024

I used this to add any text remaining in the input as a tag upon form submission (something I think is expected behavior for tag inputs, by the way).

I can confirm evereq's issues as well: the feature will expect 'tags' to be the last plugin specified in the options parameters. Otherwise, it will select whichever plugin is last instead.

   $('#form_element').submit(function(){
      var input_element = $('.textext-input-element');
      input_element.textext()[0].tags().addTags([ input_element.val() ]);
      input_element.val("");
   });

from jquery-textext.

rodrigosilveirafa avatar rodrigosilveirafa commented on July 27, 2024

Hi evereq!
Try it:
$('#keywords').textext()[0].tags().addTags([ { name: 'Hello', id: '1' },{ name: 'Shit', id: '2' } ]);

from jquery-textext.

Related Issues (20)

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.