-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to pre-populate a text field with mentions? #47
Comments
+1 |
This is actually an extremely important feature - in order to use the plugin as an editor you need to be able to set the marked up initial text |
Hi, I'm not much of a JavaScript coder, but I stumbled on this while looking for something similar. I've hacked this together:
Put it somewhere in the public methods of the javascript file. In your own code, you should call Mind you that:
(Both reasons are why I didn't fork and did a pull request: the above is far from tested and isn't ready for production due to the hardcoded template translation). |
Thanks mr. LaundroMat :-) Also I had to write a different version of getInputBoxValue() - couldn't get jQuery textarea.val() to work:
|
Doesn't work in IE, this was what I meant:
(Works in IE9, FF14 & CHR21) |
This is already possible with "defaultValue" parameter (although ( still have issues with it). |
AFAIK this is not possible out of the box, but how should I proceed if I want to pre-populate a text field that contains mentions. The highlighting and the mentions should be preserved.
The text was updated successfully, but these errors were encountered: