MyBB Community Forums

Full Version: Reactivate youtube button in sceditor
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[Image: WCbPuGL.png]


Sceditor has a lot of buttons .. but they are deacticvated in mybb.

To reactivate Youtube button...we need to do this in 3 steps :

1.  open bbcodes_sceditor.js in javascript folder and search and comment this lines (with //)
$.sceditor.command
.remove('table').remove('subscript').remove('superscript').remove('youtube').remove('ltr').remove('rtl');
	
$.sceditor.plugins.bbcode.bbcode
.remove('table').remove('tr').remove('th').remove('td').remove('sub').remove('sup').remove('youtube').remove('ltr').remove('rtl');


2.  open codebuttons template and add youtube to toolbar
[Image: 2nqZXf5.png]



3. Add youtube mycode like this :

Title : youtube
Regular Expression : \[youtube\](.*?)\[/youtube\]
Replacement :
<iframe width="560" height="315" src="//www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>


that's all.
Good tutorial, worked great for me.