-
Notifications
You must be signed in to change notification settings - Fork 304
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
Help #29
Comments
Can you try |
i tried but i cant write anything. i need contenteditable="true". ithink i should change tribute.js when i see #hContent id i'll return nothing. |
$("#mainEditor").keyup(function () {
var focusNode = window.getSelection().focusNode;
var idFocus = "";
var parentNode = focusNode.parentNode;
idFocus = parentNode.id;
if (idFocus == "hContent") {
console.log("not here");
} else {
tribute.attach($('#mainEditor'));
}
}); i wrote this code and mentions doesnt work in #hContent h3. it is ok for me. But when i mentions other element in #mainEditor div. how i can do it. Please help me |
This doesn't help me get a picture of what you are trying to do. It would be best if you could create a plunkr or jsfiddle that has both the markup and the JS you are using. However, it does seem that I would do this: <div id="mainEditor">
<h3>Title</h3>
<div class="content">
Editable content.
</div>
</div> For the js: tribute.attach($('#mainEditor').find('.content')) Then you would make the |
I'm going to close this issue since I feel like the above is the best route for you to take. |
i wrote special ediitor and i use your library for mentions.
my div id is mainEditor.
tribute.attach($('#mainEditor'));
it works perfect but i have a special situation. this div (mainEditor) has a h3 (h3 id is hContent )and i dont want to mentions only this element. Please help me.
The text was updated successfully, but these errors were encountered: