rich editor integrated
This commit is contained in:
parent
ccc90fff17
commit
c1303373f0
7 changed files with 33 additions and 33 deletions
|
|
@ -1012,24 +1012,11 @@ sub www_edit {
|
|||
name=>"title",
|
||||
value=>$title
|
||||
});
|
||||
if ($self->getThread->getParent->get("allowRichEdit")) {
|
||||
$var{'content.form'} = WebGUI::Form::textarea({
|
||||
name=>"content",
|
||||
value=>$content
|
||||
});
|
||||
WebGUI::Style::setScript($session{config}{extrasURL}.'/tinymce/jscripts/tiny_mce/tiny_mce.js',{type=>"text/javascript"});
|
||||
$var{'content.form'} = ' <script language="javascript" type="text/javascript">
|
||||
tinyMCE.init({
|
||||
theme : "simple",
|
||||
mode : "textareas"
|
||||
});
|
||||
</script> <textarea name="content" style="min-width: 400px; width: 100%; height: 300px;">'.$content.'</textarea>';
|
||||
} else {
|
||||
$var{'content.form'} = WebGUI::Form::textarea({
|
||||
name=>"content",
|
||||
value=>$content
|
||||
});
|
||||
}
|
||||
$var{'content.form'} = WebGUI::Form::HTMLArea({
|
||||
name=>"content",
|
||||
value=>$content,
|
||||
richEditId=>$self->getThread->getParent->get("richEditor")
|
||||
});
|
||||
$var{'form.submit'} = WebGUI::Form::submit({
|
||||
extras=>"onclick=\"this.value='".WebGUI::International::get(452)."'; this.form.func.value='editSave'; this.form.submit();\""
|
||||
});
|
||||
|
|
|
|||
|
|
@ -325,9 +325,9 @@ sub definition {
|
|||
fieldType=>"filterContent",
|
||||
defaultValue=>'javascript'
|
||||
},
|
||||
allowRichEdit =>{
|
||||
fieldType=>"yesNo",
|
||||
defaultValue=>0
|
||||
richEditor =>{
|
||||
fieldType=>"selectList",
|
||||
defaultValue=>"PBrichedit000000000002"
|
||||
},
|
||||
attachmentsPerPost =>{
|
||||
fieldType=>"integer",
|
||||
|
|
@ -527,10 +527,11 @@ sub getEditForm {
|
|||
-label=>WebGUI::International::get('edit stamp', 'Asset_Collaboration'),
|
||||
-value=>$self->getValue("addEditStampToPosts")
|
||||
);
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>"allowRichEdit",
|
||||
-label=>WebGUI::International::get('rich edit', 'Asset_Collaboration'),
|
||||
-value=>$self->getValue("allowRichEdit")
|
||||
$tabform->getTab("display")->selectList(
|
||||
-name=>"richEditor",
|
||||
-label=>WebGUI::International::get('rich editor', 'Asset_Collaboration'),
|
||||
-options=>WebGUI::SQL->buildHashRef("select assetId, title from asset where className='WebGUI::Asset::RichEdit' order by title"),
|
||||
-value=>[$self->getValue("richEditor")]
|
||||
);
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>"useContentFilter",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue