summaryrefslogtreecommitdiff
path: root/templates/edit_textarea.tpl
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2013-07-29 13:43:23 +0100
committerlsces <lester@lsces.co.uk>2013-07-29 13:43:23 +0100
commit4ecd7fd650cc45f7ff798b2e5a1e032b038236f1 (patch)
treefb14fb2d03383f9f2f3807556ea4ea71a9f63c02 /templates/edit_textarea.tpl
parent42c8c6fddb7169f0164a8bb6adc8b176a895d298 (diff)
downloadliberty-4ecd7fd650cc45f7ff798b2e5a1e032b038236f1.tar.gz
liberty-4ecd7fd650cc45f7ff798b2e5a1e032b038236f1.tar.bz2
liberty-4ecd7fd650cc45f7ff798b2e5a1e032b038236f1.zip
Add back in CKE4 toolbar options
CKE4 has been re-engineered as a 'programmable download' which does not help allowing configuration based on role or used preferences. Work still needed to restore some features.
Diffstat (limited to 'templates/edit_textarea.tpl')
-rw-r--r--templates/edit_textarea.tpl67
1 files changed, 62 insertions, 5 deletions
diff --git a/templates/edit_textarea.tpl b/templates/edit_textarea.tpl
index 798a453..986b2ab 100644
--- a/templates/edit_textarea.tpl
+++ b/templates/edit_textarea.tpl
@@ -35,14 +35,71 @@
{formhelp note=$textarea_help}
{if $gBitSystem->isPackageActive('ckeditor')}
- <script>
- CKEDITOR.replace( '{$smarty.const.LIBERTY_TEXT_AREA}' );
- </script>
+ <script>
+ CKEDITOR.replace( '{$smarty.const.LIBERTY_TEXT_AREA}', {
+ toolbarGroups: [
+ {if $gBitSystem->getConfig('ckedit_toolbars') eq 'Full'}
+ { name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
+ { name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
+ { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
+ { name: 'forms' },
+ '/',
+ { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
+ { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align' ] },
+ '/',
+ { name: 'links' },
+ { name: 'insert' },
+ '/',
+ { name: 'styles' },
+ { name: 'colors' },
+ { name: 'tools' },
+ { name: 'others' },
+ { name: 'about' }
+ {elseif $gBitSystem->getConfig('ckedit_toolbars') eq 'Advanced'}
+ { name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
+ { name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
+ { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
+ { name: 'forms' },
+ '/',
+ { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
+ { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align' ] },
+ '/',
+ { name: 'links' },
+ { name: 'insert' },
+ '/',
+ { name: 'styles' },
+ { name: 'colors' },
+ { name: 'tools' },
+ { name: 'others' },
+ { name: 'about' }
+ {elseif $gBitSystem->getConfig('ckedit_toolbars') eq 'Intermediate'}
+ { name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
+ { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
+ { name: 'forms' },
+ '/',
+ { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
+ '/',
+ { name: 'links' },
+ { name: 'insert' },
+ '/',
+ { name: 'styles' },
+ { name: 'colors' },
+ { name: 'tools' },
+ { name: 'others' },
+ { name: 'about' }
+ {else}
+ { name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
+ { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
+ { name: 'links' }
+ {/if}
+ ]
+ });
+ </script>
- {if ($gBitSystem->isFeatureActive("ckeditor_ask") ||
+ {* if ($gBitSystem->isFeatureActive("ckeditor_ask") ||
$gBitSystem->isFeatureActive("ckeditor_on_click"))}
{formhelp note="Click in the textarea to activate the editor."}
- {/if}
+ {/if *}
{/if}
{/forminput}
</div>