Create instance of RTE?

Liam W

in memoriam 1998-2020
I don't know which one would be easier (RTE would be better).

How would I add a RTE instance to a custom addon page?

Is there a tutorial somewhere?

Liam
 
*does not know what RTE is*
Rich Text Editor

------------------------------

You can get the editor HTML in your view through a helper
Code:
$this->_params['editorTemplate'] = XenForo_ViewPublic_Helper_Editor::getEditorTemplate(
	$this, 'some_name', 'Initial content'
);

The parameters are:
1) The view calling the function ( eg. $this )
2) The name of the editor ( for the form )
3) (Optional) The initial content ( Usually something from $this->_params )

To put it in your template:
Code:
{xen:raw $editorTemplate}

To retrieve the input in the controller when saving:
Code:
$var = $this->getHelper( 'Editor' )->getMessageText( 'some_name', $this->_input );
 
Rich Text Editor

------------------------------

You can get the editor HTML in your view through a helper
Code:
$this->_params['editorTemplate'] = XenForo_ViewPublic_Helper_Editor::getEditorTemplate(
$this, 'some_name', 'Initial content'
);

The parameters are:
1) The view calling the function ( eg. $this )
2) The name of the editor ( for the form )
3) (Optional) The initial content ( Usually something from $this->_params )

To put it in your template:
Code:
{xen:raw $editorTemplate}

To retrieve the input in the controller when saving:
Code:
$var = $this->getHelper( 'Editor' )->getMessageText( 'some_name', $this->_input );


Thanks :D
 
Rich Text Editor

------------------------------

You can get the editor HTML in your view through a helper
Code:
$this->_params['editorTemplate'] = XenForo_ViewPublic_Helper_Editor::getEditorTemplate(
$this, 'some_name', 'Initial content'
);

The parameters are:
1) The view calling the function ( eg. $this )
2) The name of the editor ( for the form )
3) (Optional) The initial content ( Usually something from $this->_params )

To put it in your template:
Code:
{xen:raw $editorTemplate}

To retrieve the input in the controller when saving:
Code:
$var = $this->getHelper( 'Editor' )->getMessageText( 'some_name', $this->_input );


How do I convert BBCode to HTML?
 
Back
Top Bottom