function my_imagem($data){
$sandals = new \Imagick();
$logo = new \Imagick();
$sandals->readImageBlob("mymodel.png");
$logo->readImageBlob("mymodel.png");
$logo->resizeImage(1000, 1000, imagick::FILTER_LANCZOS, 1, TRUE);
$sandals->setImageFormat('png');
$creases = new \Imagick();
$creases->newpseudoimage(
$sandals->getImageWidth(),
$sandals->getImageHeight(),
"XC:none"
);
$creases->compositeimage($sandals, \Imagick::COMPOSITE_DIFFERENCE, 0, 0);
$creases->setImageFormat('png');
$logoCentre = new \Imagick();
$logoCentre->newpseudoimage(
$sandals->getImageWidth(),
$sandals->getImageHeight(),
"XC:none"
);
$logoCentre->setImageFormat('png');
$logoCentre->compositeImage($logo, Imagick::COMPOSITE_SRCOVER, 45, 450);
$logoCentreMask = clone $logoCentre;
$logoCentreMask->compositeimage($logoCentre, \Imagick::COMPOSITE_SRCIN, 0, 0);
$sandals->compositeimage($logoCentreMask, \Imagick::COMPOSITE_DEFAULT, 0, 0);
header("Content-Type: image/png");
return $sandals->getImageBlob();
}
$('#btnsave').click(function(){
console.log($('#story').html());
});
#story{
background:gold;
min-height:54px;
}
如果<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id='story' contentEditable='true'></div>
<br>
<button id='btnsave'>SAVE</button>
具有一行内容,例如story
console.log给出lorem ipsum
。
每条NEXT行都用lorem ipsum
标签包裹。
为什么第一行未标记以及如何获得此功能?