version 1.462, 2007/10/08 09:20:22
|
version 1.464, 2007/10/10 14:39:49
|
Line 1464 sub inserteditinfo {
|
Line 1464 sub inserteditinfo {
|
my $initialize=''; |
my $initialize=''; |
my $textarea_id = 'filecont'; |
my $textarea_id = 'filecont'; |
my ($add_to_onload, $add_to_onresize); |
my ($add_to_onload, $add_to_onresize); |
my $addbuttons=&Apache::lonhtmlcommon::htmlareaaddbuttons(); |
|
$initialize=&Apache::lonhtmlcommon::spellheader(); |
$initialize=&Apache::lonhtmlcommon::spellheader(); |
if ($filetype eq 'html' |
if ($filetype eq 'html' |
&& (!&Apache::lonhtmlcommon::htmlareablocked() && |
&& (!&Apache::lonhtmlcommon::htmlareablocked() && |
&Apache::lonhtmlcommon::htmlareabrowser())) { |
&Apache::lonhtmlcommon::htmlareabrowser())) { |
$textarea_id .= '_htmlarea'; |
$textarea_id .= '___Frame'; |
|
my $lang = &Apache::lonhtmlcommon::htmlarea_lang(); |
$initialize.=(<<FULLPAGE); |
$initialize.=(<<FULLPAGE); |
<script type="text/javascript"> |
<script type="text/javascript"> |
$addbuttons |
lonca |
|
|
HTMLArea.loadPlugin("FullPage"); |
|
|
|
function initDocument() { |
function initDocument() { |
var editor=new HTMLArea("filecont",config); |
var oFCKeditor = new FCKeditor('filecont'); |
editor.registerPlugin(FullPage); |
oFCKeditor.Config['CustomConfigurationsPath'] = '/fckeditor/loncapaconfig.js' ; |
editor.generate(); |
oFCKeditor.Config['FullPage'] = true |
setTimeout( |
oFCKeditor.Config['AutoDetectLanguage'] = false; |
function () { |
oFCKeditor.Config['DefaultLanguage'] = "$lang"; |
HTMLArea._addEvents(editor._doc, |
oFCKeditor.ReplaceTextarea(); |
["keypress","mousedown"], unClean); |
} |
editor._iframe.id = '$textarea_id'; |
function check_if_dirty(editor) { |
resize_textarea('$textarea_id','LC_aftertextarea'); |
if (editor.IsDirty()) { |
},300); |
unClean(); |
|
} |
|
} |
|
function FCKeditor_OnComplete(editor) { |
|
editor.Events.AttachEvent("OnSelectionChange",check_if_dirty); |
|
resize_textarea('$textarea_id','LC_aftertextarea'); |
} |
} |
</script> |
</script> |
FULLPAGE |
FULLPAGE |
} else { |
} else { |
$initialize.=(<<FULLPAGE); |
$initialize.=(<<FULLPAGE); |
<script type="text/javascript"> |
<script type="text/javascript"> |
$addbuttons |
|
function initDocument() { |
function initDocument() { |
resize_textarea('$textarea_id','LC_aftertextarea'); |
resize_textarea('$textarea_id','LC_aftertextarea'); |
} |
} |