MyBB Community Forums

Full Version: MyBB javascript parser not working properly
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
You can force it to source mode Smile
It wasn't an option for me.

Anyway, I fixed it and I suggest you to fix it in next releases too please. I can't assure you it won't bug anything, but it works well for me.

I edited /jscripts/bbcodes_sceditor.js file where it parses the 'align' code. So, from this code:

.set('align', {
			html: function(element, attrs, content) {
				return '<div align="' + (attrs.defaultattr || 'left') + '">' + content + '</div>';
			},
			isInline: false
		})

To this code:

.set('align', {
			html: function(element, attrs, content) {
				return '<div style="text-align:"' + (attrs.defaultattr || 'left') + '" align="' + (attrs.defaultattr || 'left') + '">' + content + '</div>';
			},
			isInline: false
		})
Please post as a bug in the 1.8 bugs and issues
Pages: 1 2