The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Adding a Custom Button to the ForuMotion Text Editor

View previous topic View next topic Go down

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

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

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

kirk
Forumaster

Male Posts : 11037
Reputation : 651
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 on 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
Forumaster

Male Posts : 11037
Reputation : 651
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 on 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://illiweb.com/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>';
    }
});

Guest
Guest


Back to top Go down

View previous topic View next topic Back to top


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