• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

forum.node_id conditional in editor_js_setup not funtioning

MOZ

Well-known member
#1
So, I am rearranging some buttons in the TinyMCE editor, I want to use the forum.node_id conditional however it won't work.

This is how I have it:

Code:
theme_xenforo_buttons2 : 'bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,adv_cust_staff,|,bullist,numlist,outdent,indent,|,<xen:if is="{$forum.node_id} == 28">link,unlink,</xen:if>image,xenforo_media,|,xenforo_code,xenforo_custom_bbcode',
 

Jake Bunce

XenForo moderator
Staff member
#2
The params for the editor template are defined in this file:

library/XenForo/ViewPublic/Helper/Editor.php

Code:
		return $view->createTemplateObject($templateName, array(
			'showWysiwyg' => $showWysiwyg,
			'height' => $height,
			'formCtrlNameHtml' => $formCtrlNameHtml,
			'formCtrlName' => $formCtrlName,
			'editorId' => $editorId,

			'message' => $message,
			'messageHtml' => $messageHtml,

			'smilies' => ($showWysiwyg ? self::getEditorSmilies() : array()),

			'editorOptions' => $editorOptions,
		));
The forum record is not there. It would have to be added.

Or create a new style and assign it to the forum in question.