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
How to insert text outside the editor? #70
Comments
Yes, you can use the insert() method to insert BBCode into the editor (assuming you're using the BBCode plugin)
|
That code there how would i place that into a hyperlink? Many thanks! (yeah this is bbcode plugin) |
You could do something like this:
or this:
|
Right I will have a go at that, many thanks! I think this will totally replace tinymce for me, once you get it installed it works so much better! |
Hmm testing it, neither of them seem to work? Any idea what I could have missed to make it out right not work? |
Is e.g. did you do:
to create it? If not it needs to be set to the same jQuery selector that was used to create the editor. |
Yeah i didn't change the name and the page im testing on has only one textarea. Here is how i am including it: jQuery(document).ready(function($){
}); |
I'm not too sure what's causing the problem. I've uploaded a demo here the source is here. |
Hmm i don't see anything different, see here: http://www.prxa.info/forum/topic/291 that is my test website for my main one. I put a quick quote link in the top part but it doesn't work. |
Hmmm you included yours inside the "$(document).ready(function() {}" does it have to be inside one of those to work? |
Hah that got it! |
if you have this:
then you may not use: you must use:
|
It's because jQuery is in no conflict mode. Try this:
|
Infact i just put in this:
And now it works. Only thing is i would need to have that code before every post to have the quote updated, is there a way to have it dynamically get the text some how? |
Anyway I cry a lot seeing jQuery being used like that... |
Use ajax. I'd tell you the proper way but I know some1 will come here with another solution and you won't use mine... Just check how to use ajax... |
I don't know any javascript/ajax hence me coming here asking for help. |
you wouldn't build a chair if you didn't know how to build it, right? It will get you started on js. It has loads of stuff for you to learn, try and get used to how js works. |
If i had the time to learn another language i would but i don't im on a small timescale here. |
In that case, you are in deep trouble. You spend more time asking for help all the time and just using pieces of code like they were just some sacred stuff that may not be changed than what you'd spend if you just learned enough to understand it and then do it yourself. |
I learn by tinkering not but reading or going through big tutorials. I learn by doing it. I am not here for a lecture if you aren't going to help please stop replying, thank you. |
@LiamDawe If you still need help with this send me an e-mail to sam@samclarke.com and I'll try help. |
Thanks but one of my readers actually came up with a way to do it, thank you anyway! :) |
Say I want to have a button on comments on my website saying "Quote" and if someone presses it, it then inserts the text from that comment wrapped in quotes tags into the editor, is that easily possible?
The text was updated successfully, but these errors were encountered: