updated rich edit to 1.45
fixed cache privileges problem added new buttons to rich edit rich edit now defaults to allow any HTML tags
This commit is contained in:
parent
677558fe71
commit
8a5c997441
9 changed files with 56 additions and 17 deletions
|
|
@ -1,4 +1,10 @@
|
|||
6.7.0
|
||||
- Upgraded the rich editor to 1.45.
|
||||
- Rich edit now has three new buttons: paste from word, paste as plain text,
|
||||
and fullscreen.
|
||||
- Rich editor defaultly does not validate HTML tags and therefore will allow
|
||||
the slop that it was stripping out before. While less strict, this is less
|
||||
confusing to end users.
|
||||
- Being in the admins group automatically results in a UI level capable of
|
||||
seeing everything.
|
||||
- fix [ 1251390 ] Security tab doesn't appear for member of Admins
|
||||
|
|
|
|||
|
|
@ -31,9 +31,20 @@ makeSyndicatedContentChanges();
|
|||
removeOldThemeSystem();
|
||||
addSectionsToSurveys();
|
||||
increaseProxyUrlLength();
|
||||
upgradeRichEdit();
|
||||
|
||||
WebGUI::Session::close();
|
||||
|
||||
#-------------------------------------------------
|
||||
sub upgradeRichEdit {
|
||||
print "\tUpgrade rich editor to version 1.45.\n" unless ($quiet);
|
||||
WebGUI::SQL->write("update RichEdit set extendedValidElements='*[*]' where assetId='PBrichedit000000000001'");
|
||||
my $prepend = 'a[name|href|target|title],strong/b[class],em\/i[class],strike[class],u[class],p[dir|class|align],ol,ul,li,br,img[class|src|border=0|alt|title|hspace|vspace|width|height|align],sub,sup,blockquote[dir|style],table[border=0|cellspacing|cellpadding|width|height|class|align],tr[class|rowspan|width|height|align|valign],td[dir|class|colspan|rowspan|width|height|align|valign],div[dir|class|align],span[class|align],pre[class|align],address[class|align],h1[dir|class|align],h2[dir|class|align],h3[dir|class|align],h4[dir|class|align],h5[dir|class|align],h6[dir|class|align],hr';
|
||||
WebGUI::SQL->write("update RichEdit set extendedValidElements=concat(".quote($prepend).",',',extendedValidElements) where assetId<>'PBrichedit000000000001'");
|
||||
WebGUI::SQL->write("alter table RichEdit change extendedValidElements validElements mediumtext");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
sub increaseProxyUrlLength {
|
||||
print "\tMaking HTTP Proxy URLs accept lengths of up to 2048 characters.\n" unless ($quiet);
|
||||
|
|
|
|||
|
|
@ -1458,7 +1458,7 @@ sub www_manageAssets {
|
|||
."','".formatBytes($child->get("assetSize"))."','<a href=\"".$child->getUrl("func=manageRevisions")."\">".$locked."</a>');\n";
|
||||
$output .= "assetManager.AddLineSortData('','','','".$title."','".$child->getName
|
||||
."','".$child->get("revisionDate")."','".$child->get("assetSize")."','".$locked."');
|
||||
assetManager.addAssetMetaData('".$child->getUrl."', '".$child->getRank."', '".$child->getTitle."');\n";
|
||||
assetManager.addAssetMetaData('".$child->getUrl."', '".$child->getRank."', '".$title."');\n";
|
||||
}
|
||||
$output .= '
|
||||
assetManager.AddButton("'.$i18n->get("delete").'","deleteList","manageAssets");
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ sub definition {
|
|||
fieldType=>'yesNo',
|
||||
defaultValue=>0
|
||||
},
|
||||
extendedValidElements=>{
|
||||
validElements=>{
|
||||
fieldType=>'textarea',
|
||||
defaultValue=>'a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]'
|
||||
},
|
||||
|
|
@ -162,6 +162,8 @@ sub getEditForm {
|
|||
'cut' => WebGUI::International::get('cut', 'Asset_RichEdit'),
|
||||
'copy' => WebGUI::International::get('copy', 'Asset_RichEdit'),
|
||||
'paste' => WebGUI::International::get('paste', 'Asset_RichEdit'),
|
||||
'pastetext' => WebGUI::International::get('pastetext', 'Asset_RichEdit'),
|
||||
'pasteword' => WebGUI::International::get('pasteword', 'Asset_RichEdit'),
|
||||
'undo' => WebGUI::International::get('undo', 'Asset_RichEdit'),
|
||||
'redo' => WebGUI::International::get('redo', 'Asset_RichEdit'),
|
||||
'bold' => WebGUI::International::get('bold', 'Asset_RichEdit'),
|
||||
|
|
@ -207,6 +209,7 @@ sub getEditForm {
|
|||
'cleanup' => WebGUI::International::get('cleanup', 'Asset_RichEdit'),
|
||||
'save' => WebGUI::International::get('save', 'Asset_RichEdit'),
|
||||
'preview' => WebGUI::International::get('preview', 'Asset_RichEdit'),
|
||||
'fullscreen' => WebGUI::International::get('fullscreen', 'Asset_RichEdit'),
|
||||
'zoom' => WebGUI::International::get('zoom', 'Asset_RichEdit'),
|
||||
'print' => WebGUI::International::get('print', 'Asset_RichEdit'),
|
||||
# 'advlink' => "Advanced Link",
|
||||
|
|
@ -276,11 +279,11 @@ sub getEditForm {
|
|||
-uiLevel=>9
|
||||
);
|
||||
$tabform->getTab("security")->textarea(
|
||||
-value=>$self->getValue("extendedValidElements"),
|
||||
-name=>"extendedValidElements",
|
||||
-label=>WebGUI::International::get('extended elements', 'Asset_RichEdit'),
|
||||
-hoverHelp=>WebGUI::International::get('extended elements description', 'Asset_RichEdit'),
|
||||
-subtext=>WebGUI::International::get('extended elements subtext', 'Asset_RichEdit'),
|
||||
-value=>$self->getValue("validElements"),
|
||||
-name=>"validElements",
|
||||
-label=>WebGUI::International::get('elements', 'Asset_RichEdit'),
|
||||
-hoverHelp=>WebGUI::International::get('elements description', 'Asset_RichEdit'),
|
||||
-subtext=>WebGUI::International::get('elements subtext', 'Asset_RichEdit'),
|
||||
-uiLevel=>9
|
||||
);
|
||||
$tabform->getTab("display")->integer(
|
||||
|
|
@ -412,12 +415,13 @@ sub getRichEditor {
|
|||
nowrap => $self->getValue("nowrap") ? "true" : "false",
|
||||
directionality => $self->getValue("directionality"),
|
||||
theme_advanced_toolbar_location => $self->getValue("toolbarLocation"),
|
||||
extended_valid_elements => $self->getValue("extendedValidElements"),
|
||||
valid_elements => $self->getValue("validElements"),
|
||||
);
|
||||
foreach my $button (@toolbarButtons) {
|
||||
push(@plugins,"table") if ($button eq "tablecontrols");
|
||||
push(@plugins,"save") if ($button eq "save");
|
||||
push(@plugins,"advhr") if ($button eq "advhr");
|
||||
push(@plugins,"fullscreen") if ($button eq "fullscreen");
|
||||
if ($button eq "advimage") {
|
||||
push(@plugins,"advimage");
|
||||
$config{external_link_list_url} = "";
|
||||
|
|
@ -429,6 +433,9 @@ sub getRichEditor {
|
|||
}
|
||||
push(@plugins,"emotions") if ($button eq "emotions");
|
||||
push(@plugins,"iespell") if ($button eq "iespell");
|
||||
if ($button eq "paste" || $button eq "pastetext" || $button eq "pasteword") {
|
||||
push(@plugins,"paste");
|
||||
}
|
||||
if ($button eq "insertdate" || $button eq "inserttime" || $button eq "insertdatetime") {
|
||||
$config{plugin_insertdate_dateFormat} = "%Y-%m-%d";
|
||||
$config{plugin_insertdate_timeFormat} = "%H:%M:%S";
|
||||
|
|
|
|||
|
|
@ -232,7 +232,10 @@ sub set {
|
|||
my $ttl = shift || 60;
|
||||
my $path = $self->getFolder();
|
||||
unless (-e $path) {
|
||||
eval {mkpath($path)};
|
||||
my $oldumask = umask();
|
||||
umask(0000);
|
||||
eval {mkpath($path,0)};
|
||||
umask($oldumask);
|
||||
if ($@) {
|
||||
WebGUI::ErrorHandler::error("Couldn't create cache folder: ".$path." : ".$@);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ our $HELP = {
|
|||
namespace => 'Asset_RichEdit',
|
||||
},
|
||||
{
|
||||
title => 'extended elements',
|
||||
description => 'extended elements description',
|
||||
title => 'elements',
|
||||
description => 'elements description',
|
||||
namespace => 'Asset_RichEdit',
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,13 +17,13 @@ our $I18N = {
|
|||
lastUpdated => 1115139859,
|
||||
},
|
||||
|
||||
'extended elements' => {
|
||||
message => q|Extended Valid Elements|,
|
||||
'elements' => {
|
||||
message => q|Valid Elements|,
|
||||
lastUpdated => 1115148094,
|
||||
},
|
||||
|
||||
'extended elements subtext' => {
|
||||
message => q|<br /> Must appear on one line, no carriage returns.|,
|
||||
'elements subtext' => {
|
||||
message => q|<br /> Must appear on one line, no carriage returns, and in the format of tag1[attr1\|attr2],tag2[attr1].|,
|
||||
lastUpdated => 1115148094,
|
||||
},
|
||||
|
||||
|
|
@ -122,6 +122,18 @@ our $I18N = {
|
|||
message => q|Paste|,
|
||||
lastUpdated => 1115150778,
|
||||
},
|
||||
'pastetext' => {
|
||||
message => q|Paste as Plain Text|,
|
||||
lastUpdated => 1115150778,
|
||||
},
|
||||
'pasteword' => {
|
||||
message => q|Paste from Word|,
|
||||
lastUpdated => 1115150778,
|
||||
},
|
||||
'fullscreen' => {
|
||||
message => q|Fullscreen|,
|
||||
lastUpdated => 1115150778,
|
||||
},
|
||||
'undo' => {
|
||||
message => q|Undo|,
|
||||
lastUpdated => 1115150778,
|
||||
|
|
@ -354,8 +366,8 @@ option is set to Yes, then all whitespace entered into the form will be preserve
|
|||
lastUpdated => 1119584875,
|
||||
},
|
||||
|
||||
'extended elements description' => {
|
||||
message => q|A list of HTML tags and which elements are allowed inside of them.|,
|
||||
'elements description' => {
|
||||
message => q|A list of HTML tags and their attributes that the rich editor will accept. All others will be stripped. To allow anything set it to *[*]. |,
|
||||
lastUpdated => 1119584875,
|
||||
},
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1,022 B After Width: | Height: | Size: 1,022 B |
Loading…
Add table
Add a link
Reference in a new issue