【问题标题】:Tagging inside Text Area in React Bootstrap 3在 React Bootstrap 3 中的文本区域内标记
【发布时间】:2018-07-20 15:05:37
【问题描述】:

我希望能够在 React 的文本区域内实现一些分类标记(或使用库)。

我目前正在使用 react-bootstrap 组件,并且我有一个这样的组件

<FormGroup>
  <ControlLabel className="additem-label">{props.labelTitle}</ControlLabel>
  <FormControl type="text" placeholder={props.placeHolderText} onChange={(event) => props.updateData(props.formType, event)}  />
</FormGroup>

由于标签必须进入 FormControl 但这是一个已创建的库,所以无论如何我可以在其中添加某种形式的 jquery 标记吗? (https://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/)

我被卡住了,因为我不知道如何在特定的 react bootstrap 组件中实际添加 DOM 元素,因为我不知道它的结构。

【问题讨论】:

    标签: javascript jquery css reactjs twitter-bootstrap-3


    【解决方案1】:

    也许这个 React 包可以帮助你。 https://github.com/prakhar1989/react-tags

    这也是一个不错的选择 https://github.com/olahol/react-tagsinput

    【讨论】:

      【解决方案2】:

      Bootstrap Tags Input 是一个 jQuery 插件, 你可以使用一些基于反应的库,比如react-tag-autocomplete

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2013-01-10
        • 1970-01-01
        • 2013-05-14
        • 2017-02-14
        • 2016-07-03
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多