简体   繁体   English

Javascript库,用于像Evernote一样制作“菱形”样式的按钮,同时在自动完成的下拉列表框中累积选择内容吗?

[英]Javascript library for making “lozenge” style buttons like Evernote does while accumulating selections from an auto-complete drop-down list box?

The Evernote Web Clipper extension for Chrome has a "lozenge" style button that is created for each Tag (Tag = word or phrase entry) you choose from an auto-complete drop-down list box. 适用于Chrome的Evernote Web Clipper扩展程序具有一个“菱形”样式按钮,该按钮针对从自动完成下拉列表框中选择的每个标记(标记=单词或短语条目)创建。 The lozenges are similar to the stack overflow Tag in that they look like small colored buttons with the Tag text in the center, and a little "x" in the upper right corner to delete the Tag. 锭剂类似于堆栈溢出标签,因为它们看起来像彩色的小按钮,标签文本位于中间,右上角有一个小的“ x”以删除标签。 The difference is that Evernote uses a drop-down list box with auto-complete that rolls down from directly beneath where you are typing into the edit box that is accumulating your Tag choices. 区别在于,Evernote使用一个具有自动完成功能的下拉列表框,该列表框从您正在输入标记框的编辑框正下方滚动下来。 Therefore, as you select each tag you end up with a line of lozenges behind the entry your are currently entering. 因此,当您选择每个标签时,最终在您当前输入的条目后面有一行菱形。 Clicking on a lozenge's deletion mini-box removes the lozenge from the edit box. 单击一个锭剂的删除迷你框,将其从编辑框中移除。

It's a pretty complex series of operations and to try duplicating it with one of the standard JQuery elements or a similar item would be a significant amount of work (especially the lozenge drawing and event handling for the delete mini-box). 这是一系列非常复杂的操作,尝试与标准JQuery元素或类似项目之一进行复制将需要大量工作(尤其是菱形图和删除迷你框的事件处理)。 Is there a Javascript library that has this same function? 是否有一个具有相同功能的Javascript库? If so, please tell me the name of the library (link if you have it) and what module or element is the one I need to study. 如果是这样,请告诉我该库的名称(如果有,请链接),以及我需要学习的模块或元素。

If you are referring to the image in the url (my reputation dont allow me to upload. :(), I believe there are some similar question with answers that points to the correct plugin. 如果您是指url中的图像(我的名声不允许我上传。:(),我相信还有一些类似的问题,其答案指向正确的插件。

Screenshot of Evernote Web Clipper: http://i.imgur.com/oQT6H.png Evernote Web Clipper的屏幕截图: http : //i.imgur.com/oQT6H.png

If so, answers are available here: plugin to separate tags (like the stackoverflow's input tags interface) 如果是这样,可以在这里找到答案: 用于分隔标签的插件(例如stackoverflow的输入标签界面)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM