<p dir="auto">PR is alternative to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2352886035" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/4894" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/4894/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/4894">#4894</a> for displaying indicator, using bootstrap alerts, if (message, diary entry, diary entry comment) body is empty and user selects Preview button.</p>
<p dir="auto"><span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #3748.">Fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1402324314" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/3748" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/3748/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/3748">#3748</a>. Added check to richtext.js to detect if (message, diary entry, diary entry comment) body is empty, and if positive, inserts alert-danger "Nothing to preview!" at the beginning of content section.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/5023'>https://github.com/openstreetmap/openstreetmap-website/pull/5023</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5023/commits/52cee3be33ab89b78a6b012e8a00ff193559a250" class="commit-link">52cee3b</a>  Added bootstrap alert when body preview is empty</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5023/files">2 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5023/files#diff-0d7657292b610e8871d2d00d8468108ac06888d1033743b7e645dc87e9bfec71">app/assets/javascripts/richtext.js</a>
    (14)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5023/files#diff-44438ce218f5287c58d0017f965d888715635d94280669896f75841fbd7b4cd7">config/locales/en.yml</a>
    (1)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5023.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5023.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5023.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5023.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5023">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLKV43MYOY2NKFPRSGLZOJU4HAVCNFSM6AAAAABLQYBLBSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZTENBZG4ZDOOA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLM4K7QBBCRSJGLSY4LZOJU4HA5CNFSM6AAAAABLQYBLBSWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHJB7HWPY.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5023</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5023",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5023",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>