Comments (3)
Good idea. Are you finding that you're using the same display template for all your menus? Is this essentially about reuse?
from ment.io.
Exactly. For now I've done the following:
<div mentio contenteditable
class="editor form-control editable"
mentio-macros="macros"
mentio-id="'hashtag'"
mentio-typed-term="typedTerm"
ng-model="jsonObj.html_body">
</div>
<div id="map-canvas"></div>
<mentio-menu
mentio-for="'hashtag'"
mentio-trigger-char="'#'"
mentio-items="products"
mentio-template-url="/product-mentions.tpl"
mentio-search="searchProducts(term)"
mentio-select="getProductTextRaw(item)" >
</mentio-menu>
<mentio-menu
mentio-for="'hashtag'"
mentio-trigger-char="'@'"
mentio-items="places"
mentio-template-url="/places-mentions.tpl"
mentio-search="searchPlaces(term)"
mentio-select="getPlacesTextRaw(item)">
</mentio-menu>
And I'm using mentio-select to build my resulting json. This is a simple enough solution so feel free to scratch this idea if ya dont' like it. :)
from ment.io.
Its a good idea - Adam and I have been talking about reuse. We need to do something there eventually. I'll think a little more about this one.
from ment.io.
Related Issues (20)
- Mention list not triggered when there is white space between caret and trigger char
- Collision Detection?
- Doesn't pick correct suggestion.
- Ment.io retriving the selected mentions HOT 3
- when used for textboxes in ng-repeat, updates wrong textbox
- NPM Version is not the latest HOT 1
- templates.js works improperly
- Does this supports Angular 2 onwards ?
- Deleting mentioned items when backspacing on the word... HOT 2
- The ment.io dropdown is not working when adding mentio-select.
- Support Angular 4/5 HOT 1
- Trigger mentio-menu without a trigger char
- Issue while using mention in textAngular (ng-repeat)
- Selecting an item from mention with Enter key triggers form submit.
- Ckeditor compatible
- Cannot read property 'document' of null HOT 11
- It just wont work with templates
- dropdown posiiton
- parentMentio is undefined when mentio-menu is used
- CSP issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ment.io.