The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Adding a Custom Button to the ForuMotion Text Editor

Go down

In progress Re: Adding a Custom Button to the ForuMotion Text Editor

Post by kirk February 11th 2012, 8:28 pm

you have to explain what it is you want to add.
kirk
kirk
Forumaster

Male Posts : 11037
Reputation : 653
Language : English,Vulcan,Klingon, Romulan,& Gorn

Back to top Go down

In progress Re: Adding a Custom Button to the ForuMotion Text Editor

Post by kirk February 11th 2012, 8:42 pm

Ok i will move this to the scripts and codes section

Info added
Moved from other problems to here.
member has been sent a pm with new thread link.
kirk
kirk
Forumaster

Male Posts : 11037
Reputation : 653
Language : English,Vulcan,Klingon, Romulan,& Gorn

Back to top Go down

In progress Re: Adding a Custom Button to the ForuMotion Text Editor

Post by Guest February 12th 2012, 2:25 am

That won't work properly because the "select" box will not be cleared from the screen when another editor button is clicked. All the "select" boxes are registered in the system script, and you can't add more boxes. However...

...nothing is stopping you from overwriting the contents of an unused "select" box. If you aren't using the WYSIWYG editor (and you SHOULDN'T be!), then you have lots of extra "select" boxes at your disposal. Using the above code and "select" box contents, your script would look like this:

Code:
$(document).ready(function(){
    if(document.getElementById('wurl')) {
        $('input[value="Others"]').after(' <img alt="" style="vertical-align: middle;" src="http://2img.net/i/fa/wysiwyg/separator.png" /> <input class="button2" type="button" style="height: 22px;" value="New List" onclick="selectWysiwyg(this, \'wurl\');">');
        document.getElementById('wurl').innerHTML='<button onmouseout="this.className=\'\';" onmouseover="this.className=\'selectHover\';" onclick="bbfontstyle(\'[left]\', \'[/left]\');selectWysiwyg(this, \'other\');return false;">Left</button><br><button onmouseout="this.className=\'\';" onmouseover="this.className=\'selectHover\';" onclick="bbfontstyle(\'[center]\', \'[/center]\');selectWysiwyg(this, \'other\');return false;">Center</button><br><button onmouseout="this.className=\'\';" onmouseover="this.className=\'selectHover\';" onclick="bbfontstyle(\'[right]\', \'[/right]\');selectWysiwyg(this, \'other\');return false;">Right</button><br><button onmouseout="this.className=\'\';" onmouseover="this.className=\'selectHover\';" onclick="bbfontstyle(\'[justify]\', \'[/justify]\');selectWysiwyg(this, \'other\');return false;">Justified</button><br><button onmouseout="this.className=\'\';" onmouseover="this.className=\'selectHover\';" onclick="bbfontstyle(\'[list][*]\', \'[/list]\');selectWysiwyg(this, \'other\');return false;">-List</button><br><button onmouseout="this.className=\'\';" onmouseover="this.className=\'selectHover\';" onclick="bbfontstyle(\'[spoiler]\', \'[/spoiler]\');selectWysiwyg(this, \'other\');return false;">Spoiler</button><br><button onmouseout="this.className=\'\';" onmouseover="this.className=\'selectHover\';" onclick="bbfontstyle(\'[hide]\', \'[/hide]\');selectWysiwyg(this, \'other\');return false;">Hidden</button><br>';
    }
});
avatar
Guest
Guest


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum