Allow the Rich Editor used by the Carousel to be customized for each Carousel asset instead of inheriting the Editor from the site's Settings. Fixes bug #12100.
This commit is contained in:
parent
38de00f931
commit
96ee557586
4 changed files with 30 additions and 1 deletions
|
|
@ -60,6 +60,13 @@ sub definition {
|
|||
hoverHelp => $i18n->get('carousel slideHeight description'),
|
||||
label => $i18n->get('carousel slideHeight label'),
|
||||
},
|
||||
richEditor =>{
|
||||
fieldType => "selectRichEditor",
|
||||
defaultValue => "PBrichedit000000000001",
|
||||
tab => 'display',
|
||||
label => $i18n->get('rich editor', 'Asset_Collaboration'),
|
||||
hoverHelp => $i18n->get('rich editor description'),
|
||||
},
|
||||
items =>{
|
||||
noFormPost =>1,
|
||||
fieldType =>'text',
|
||||
|
|
@ -152,7 +159,9 @@ sub getEditForm {
|
|||
$tabform->getTab("properties")->raw($tableRowStart);
|
||||
|
||||
|
||||
my $richedit = WebGUI::Asset->newByDynamicClass( $self->session, $self->session->setting->get('richEditor') );
|
||||
$self->session->log->warn('richedit:' .$self->get('richEditor'));
|
||||
my $richEditId = $self->get('richEditor') || "PBrichedit000000000001";
|
||||
my $richedit = WebGUI::Asset->newByDynamicClass( $self->session, $richEditId );
|
||||
my $config = JSON->new->encode( $richedit->getConfig );
|
||||
my $loadMcePlugins = $richedit->getLoadPlugins;
|
||||
my $items = $self->get('items') ? JSON->new->decode($self->get('items'))->{items} : [];
|
||||
|
|
|
|||
|
|
@ -140,6 +140,13 @@ our $I18N = {
|
|||
lastUpdated => 0,
|
||||
context => 'Description of asset property',
|
||||
},
|
||||
|
||||
'rich editor description' => {
|
||||
message => q{Choose a rich editor to use for entering content in each pane of the Carousel. The new setting will take effect the next time the Carousel is edited.},
|
||||
lastUpdated => 0,
|
||||
context => 'Description of asset property',
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue