The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
HIGHTLIGHT and COPY
I am interested in being able to allow my users of our baords to press one button to HIGHTLIGHT and COPY the text in the WYSIWYG Editor when starting new threads or replying.
Take a look at this javascript here. This does exactly what needs to happen, but I am having trouble with using it on vB3. I know where to add it inside the newthread template....:devious: Anyone have an ideas? |
#2
|
||||
|
||||
i figured it out, give me a few min so i can write out how i did it.
|
#3
|
|||
|
|||
Oh awesome! Thanks!
Quote:
|
#4
|
||||
|
||||
Files to edit:
Vbulletin_editor.js Template Modifications: editor_toolbar_standard Open clientscript/Vbulletin_editor.js at the bottom of the file look for: PHP Code:
PHP Code:
then save. <----------------------------------------------------------------------------------------> Template Modifications: open template editor_toolbar_standard look for: PHP Code:
Under add: You can put the copy button in two ways with a normal text link or a regular button for a text copy link: PHP Code:
for a regular button: PHP Code:
it worked on my board perfect. only way i got it to work is to have it be displayed on newthread and newreply as well. plus i only added the copylink to the standerd editor |
#5
|
|||
|
|||
Ok I have done your mod, BUT, how do I add this button UNDER the WYSIWYG editor?
Do I just edit the templage "editor_toolbar_wysiwyg"? Thanks again! Quote:
|
#6
|
||||
|
||||
its stated in the post i made on where to put it the way i put it is i added the code right under the textarea where everyone can see it. as stated in the post.
|
#7
|
|||
|
|||
The wysiwyg template (editor_toolbar_wysiwyg) is a bit different. I have tried to stick this in a few places in the template. The button shows up, but it didn't hightlight or copy the text.
Let me know what you think Quote:
|
#8
|
|||
|
|||
Ahh, do I add the change in the vbulletin_wysiwyg.js?
|
#9
|
||||
|
||||
the directions i gave you on the post i belieave is written clearly to understand on where to put everything,
or do you want the button to be displayed someplace instead of under the text area? |
#10
|
|||
|
|||
Nope,
I followed your directions step by step. I DOES work with the standard editor, but not with the WYSYWYG editor that most of my users like more. So....what I did, was add: Code:
// ############################################################################# function copyit(theField) { var tempval=eval("document."+theField) tempval.focus() tempval.select() therange=tempval.createTextRange() therange.execCommand("Copy") } Then added the button (and I also tried the TEXT version also) to the template of editor_toolbar_wysiwyg. The BUTTON show up fine just under the text area of the WYSIWYG editor(just like in your standard editor) but it just does not copy/highlight. Any other ideas on why it isnt? Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|