redactor2
4.2.1
Textareas with the class redactorEditor2-%profileName%
are automatically converted from a normal text input field to a WYSIWYG editor, e.g. B. <textarea class="redactorEditor2-full"></textarea>
, in yForm text areas in the "Individual Attributes" field: {"class":"redactorEditor2-full"}
Different profiles with different configuration settings for the Redactor editor can be created in the backend.
There is the option to give the editor your own CSS styles. All you have to do is create a file called skin.css
in the /assets/addons/ redactor2
folder.
Module input:
< fieldset class =" form-horizontal " >
< div class =" form-group " >
< label class =" col-sm-2 control-label " for =" value-1 " > VALUE 1 </ label >
< div class =" col-sm-10 " >
< textarea class =" form-control redactorEditor2-full " id =" value-1 " name =" REX_INPUT_VALUE[1] " > REX_VALUE[1] </ textarea >
</ div >
</ div >
</ fieldset >
Module output:
REX_VALUE [id= " 1 " output= " html " ]
Create a profile via module or add-on:
<?php
if (! redactor2 :: profileExists ( ' simple ' )) {
redactor2 :: insertProfile ( ' simple ' , $ description = '' , $ minheight = ' 300 ' , $ maxheight = ' 800 ' , $ urltype = ' relative ' , $ characterlimit = 0 , $ toolbarfixed = 0 , $ shortcuts = 0 , $ linkify = 1 , $ redactorPlugins = '' );
}
?>