mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
FHEMWEB/codemirror: DEF Patches inspired by MarcelK (Forum #20444)
git-svn-id: https://svn.fhem.de/fhem/trunk@5703 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
50700190ee
commit
011369fcc4
@ -2067,6 +2067,7 @@ FW_makeEdit($$$)
|
||||
FW_pO "</td>";
|
||||
|
||||
$val =~ s,\\\n,\n,g;
|
||||
$val = FW_htmlEscape($val);
|
||||
my $eval = $val;
|
||||
$eval = "<pre>$eval</pre>" if($eval =~ m/\n/);
|
||||
FW_pO "<td>";
|
||||
@ -2348,6 +2349,7 @@ sub
|
||||
FW_htmlEscape($)
|
||||
{
|
||||
my ($txt) = @_;
|
||||
$txt =~ s/&/&/g;
|
||||
$txt =~ s/</</g;
|
||||
$txt =~ s/>/>/g;
|
||||
return $txt;
|
||||
|
@ -60,12 +60,12 @@ cm_wait()
|
||||
attr[a] = userAttr[a];
|
||||
|
||||
loadLink("codemirror/"+attr.theme+".css");
|
||||
if(ltype) {
|
||||
$("head").append(
|
||||
'<style type="text/css">'+
|
||||
'.CodeMirror {height: ' + (window.innerHeight - 150) + 'px;}'+
|
||||
(ltype ?
|
||||
'.CodeMirror {height: ' + (window.innerHeight - 150) + 'px;}':
|
||||
'.CodeMirror {width: ' + (window.innerWidth - 300) + 'px;}')+
|
||||
'</style>');
|
||||
}
|
||||
|
||||
loadScript("codemirror/"+type+".js", function(){
|
||||
log("Calling CodeMirror");
|
||||
|
Loading…
Reference in New Issue
Block a user