MyBB Community Forums

Full Version: Tutorial: Adding Extra Function Buttons to the Editor.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
I don't have the editor.appendChild(toolbar2);...
Someone, please respond to this thread.
Just need an answer on how to edit this part.
http://community.mybboard.net/thread-126...#pid409362

After adding new buttons, the text area misaligned.



@Skiilz, you probably looked at the wrong post.
http://community.mybboard.net/thread-126...#pid237840
Yeah.. I did!
Thanks mate.
thanx good job...
but i cant finde ( editor.appendChild(toolbar2)Wink in my editor ?? Sad plz how can help
thanx good job...
but i cant finde ( editor.appendChild(toolbar2)Wink in my editor ?? Sad plz how can help
(2009-10-14, 08:18 PM)mazin46 Wrote: [ -> ]thanx good job...
but i cant finde ( editor.appendChild(toolbar2)Wink in my editor ?? Sad plz how can help
thanx good job...
but i cant finde ( editor.appendChild(toolbar2)Wink in my editor ?? Sad plz how can help

You should read the thread again. #62
I am in the middle of this as I consider it useful but, I stopped because...what if myBB updates version and replaces this 3 files in the future?

Is there a plugin instead available?
Thx for tuto,but this thread needs reorganization and the tuto needs update.
It's very important and useful for users here .
(2008-08-12, 12:29 PM)Michael S. Wrote: [ -> ]The changes in the files functions.php and global.php are the same. For editor.js open the file and search for:
// Create our new text area
Above add:
this.createToolbar('mytoolbar', {
	container: 'bottom',
	items: [
		{type: 'button', name: 'flash', sprite: 'flash', insert: 'flash', title: this.options.lang.title_flash},
		{type: 'button', name: 'video', sprite: 'video', insert: 'video', title: this.options.lang.title_video},
		{type: 'button', name: 'quick', sprite: 'quick', insert: 'quick', title: this.options.lang.title_quick},
		{type: 'button', name: 'stream', sprite: 'stream', insert: 'stream', title: this.options.lang.title_stream}
	]
});
After that open the file jscripts/editor_themes/*theme*/stylesheet.css and add at the end of the file:
.messageEditor .toolbar_button .toolbar_sprite_flash {
	background: url(images/flash.gif) no-repeat;
}
.messageEditor .toolbar_button .toolbar_sprite_video {
	background: url(images/video.gif) no-repeat;
}
.messageEditor .toolbar_button .toolbar_sprite_quick {
	background: url(images/quick.gif) no-repeat;
}
.messageEditor .toolbar_button .toolbar_sprite_stream {
	background: url(images/stream.gif) no-repeat;
}
The graphics for the buttons have to be in the folder jscripts/editor_themes/*theme*/images/.

This one seemed to worked perfectly, however the youtube button doesnt show in line with the code or php button, i tried removing the add new toolbar thingy, and add the code after php, and the editor disappeared. And this is how the youtube button is showing below now:-
[Image: 51045210.png]
Doesn´t work with the new version of mybb when I add this i lost my buttons.
Pages: 1 2 3 4 5 6 7