hvordan får jeg \t tabulator indent af kode genereret via jscript
Jeg er ved at lave mig en dreamweaver extension til at indsætte noget kode jeg bruger ofte og vil gerne have koden lagt pænt ind i dokumentet.Mit spørgsmål er derfor hvordan jeg får '\t' til at virke ?
Min kode ser f.eks. således ud:
function objectTag() {
var strBody = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'+
'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >'+
'\t<head>'+
'\t\t<jdoc:include type="head" />'+
'\t\t<link rel="stylesheet" href="templates/_system/css/general.css" type="text/css" /><link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/template.css" type="text/css" />'+
'\t\t<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/<?php echo $this->params->get(\'colorVariation\'); ?>.css" type="text/css" />'+
'\t\t<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/<?php echo $this->params->get(\'backgroundVariation\'); ?>_bg.css" type="text/css" />'+
'\t\t<!--[if lte IE 6]>'+
'\t\t\t<link href="templates/<?php echo $this->template ?>/css/ieonly.css" rel="stylesheet" type="text/css" />'+
'\t\t<![endif]-->'+
'\t\t<?php if($this->direction == \'rtl\') : ?> <link href="templates/<?php echo $this->template ?>/css/template_rtl.css" rel="stylesheet" type="text/css" /><?php endif; ?>'+
'\t</head>';
return strBody;
}
