Comments (5)
@halilyuce looks like you're trying to set the text string directly on the html instead of it being returned from the data
in your module. That's why the placeholder is showing there instead of the parsed html.
Check the usage example here: https://pggalaviz.github.io/vue-highlights/#/docs
from vue-highlights.
@halilyuce looks like you're trying to set the text string directly on the html instead of it being returned from the
data
in your module. That's why the placeholder is showing there instead of the parsed html.
Check the usage example here: https://pggalaviz.github.io/vue-highlights/#/docs
Thanks for the reply @pggalaviz but string data is coming from API, I created a loop in a list and I need to use this for every string. Is it possible? I have a timeline like Twitter and I want to parse @mentions, #hashtags and urls in the text thanks to your repo.
from vue-highlights.
Thanks for the reply @pggalaviz but string data is coming from API, I created a loop in a list and I need to use this for every string. Is it possible? I have a timeline like Twitter and I want to parse @mentions, #hashtags and urls in the text thanks to your repo.
It's possible to do that, but you shouldn't be passing the text string directly to the v-model
since this is a "compuded" value from the data
object of your module, you should instead create a separate module as a wrap for the vue-hightlights
one and compute your data from there as the example in the documentation.
from vue-highlights.
Thanks for the reply @pggalaviz but string data is coming from API, I created a loop in a list and I need to use this for every string. Is it possible? I have a timeline like Twitter and I want to parse @mentions, #hashtags and urls in the text thanks to your repo.
It's possible to do that, but you shouldn't be passing the text string directly to the
v-model
since this is a "compuded" value from thedata
object of your module, you should instead create a separate module as a wrap for thevue-hightlights
one and compute your data from there as the example in the documentation.
So, you mean create a child component for this and pass string as prop and use that prop value for v-model, am I right?
from vue-highlights.
So, you mean create a child component for this and pass string as prop and use that prop value for v-model, am I right?
Yes, hopefully that solves your issue.
from vue-highlights.
Related Issues (6)
- Mentions like @something.with.dots are not getting highlighted. HOT 3
- Selecting text with the keyboard doesn't work
- `v-model` binding only works one way
- The issue does not provide an export named 'Vmodel' after install the library vue-highlights
- How to stop highlight when the post has over Hashtag HOT 1
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 vue-highlights.