如何在JetBrains PhpStorm的php文件中格式化html代码?当我使用 Ctrl + Alt + L 时,它只格式化php代码。
代码示例:
@extends('Layout.Main')
@section('script2')
<script>
$( document ).ready(function() {
$("#toc").tocify({ selectors: '' })
})
</script>
@stop
@section('content')
<div class="page-title">
<div class="title-env">
<h1 class="title">{{ $book->title }}</h1>
<p class="description">{{ $book->author }}</p>
</div>
</div>
<div id="row">
<h3> Original Chapters: <br></h3>
@foreach($chapters as $c)
{{ $c->title }} <a href="../customizechapter/{{ $c->id }}"> Customize </a> <br>
@endforeach
</div>
@if(!empty($customchapters))
<div id="row">
<h3>Custom Chapters:<br></h3>
@foreach($customchapters as $c)
{{ $c->title }} <a href="../editchapter/{{ $c->id }}"> Edit </a> <a href="../deletecustomchapter/{{ $c->id }} . / .{{ $book->id }}"> delete</a> <br>
@endforeach
</div>
@endif
@stop