<?php /* Smarty version 2.6.26, created on 2020-06-25 12:26:18
         compiled from blocks/fckEditor.tpl */ ?>
<!-- build textarea with CKEditor -->

<?php if ($this->_tpl_vars['fckEditorParams']['fckEditorJsLoad']): ?>
    <script src="<?php echo @RL_LIBS_URL; ?>
ckeditor/ckeditor.js"></script>
    <script src="<?php echo @RL_LIBS_URL; ?>
ckfinder/ckfinder.js"></script>
<?php endif; ?>

<textarea name="<?php echo $this->_tpl_vars['fckEditorParams']['name']; ?>
" id="<?php echo $this->_tpl_vars['fckEditorParams']['name']; ?>
" rows="10" cols="80">
    <?php echo $this->_tpl_vars['fckEditorParams']['value']; ?>

</textarea>

<script>
var toolbar = rlConfig['fckeditor_bar'] == 'Basic' 
    ? 'Basic' 
    : [
        ['Source', '-', 'Bold', 'Italic', 'Underline', 'Strike'],
        ['Image', 'Flash', 'Link', 'Unlink', 'Anchor'],
        ['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'],
        ['TextColor', 'BGColor']
    ];

var editor_<?php echo $this->_tpl_vars['fckEditorParams']['name']; ?>
 = CKEDITOR.replace('<?php echo $this->_tpl_vars['fckEditorParams']['name']; ?>
', <?php echo '{'; ?>

    language            : rlConfig['lang'],
    width               : "<?php if ($this->_tpl_vars['fckEditorParams']['width'] == '100%' || ! $this->_tpl_vars['fckEditorParams']['width']): ?>97%<?php else: ?><?php echo $this->_tpl_vars['fckEditorParams']['width']; ?>
<?php endif; ?>",
    height              : "<?php if ($this->_tpl_vars['fckEditorParams']['height']): ?><?php echo $this->_tpl_vars['fckEditorParams']['height']; ?>
<?php else: ?>160<?php endif; ?>",
    toolbar             : toolbar,
    filebrowserBrowseUrl: rlConfig['libs_url'] + 'ckfinder/ckfinder.html',
    filebrowserUploadUrl: rlConfig['libs_url'] + 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'
<?php echo '}'; ?>
);
CKFinder.setupCKEditor(editor_<?php echo $this->_tpl_vars['fckEditorParams']['name']; ?>
, '../');
</script>

<!-- build textarea with CKEditor end -->