summaryrefslogtreecommitdiff
path: root/smartyplugins/function.textarea.php
diff options
context:
space:
mode:
Diffstat (limited to 'smartyplugins/function.textarea.php')
-rwxr-xr-xsmartyplugins/function.textarea.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/smartyplugins/function.textarea.php b/smartyplugins/function.textarea.php
index 8ce05c7..388bab6 100755
--- a/smartyplugins/function.textarea.php
+++ b/smartyplugins/function.textarea.php
@@ -92,6 +92,15 @@ function smarty_function_textarea( $pParams, &$pSmartyTemplate ) {
$gBitSmarty->assign('textarea_style', 'style="'.$style.'"');
}
$gBitSmarty->assign('textarea_class', 'class="form-control '.$class.'"');
+
+ if( !empty( $pParams['edit'] )
+ && strpos( $class, 'wysiwyg' ) !== false
+ && $gBitSystem->isPackageActive( 'ckeditor' )
+ && function_exists( 'ckeditor_code_wiki_to_pre' )
+ ) {
+ $gBitSmarty->assign( 'textarea_edit', ckeditor_code_wiki_to_pre( $pParams['edit'] ) );
+ }
+
$ret = $gBitSmarty->fetch("bitpackage:liberty/edit_textarea.tpl");
if( is_object( $gContent ) ) {
if( $formatGuid = $gContent->getField( 'format_guid' ) ) {