Markdown improvements

master
M66B 4 weeks ago
parent e9bc6512b6
commit 7bf86c053f

@ -344,7 +344,7 @@ Anything on this list is in random order and *might* be added in the near future
* [(96) Where can I find the IMAP and SMTP settings?](#faq96)
* [(97) What is 'cleanup'?](#faq97)
* [(98) Why can I still pick contacts after revoking contacts permissions?](#faq98)
* [(99) Can you add a rich text or markdown editor?](#faq99)
* [(99) What should I know about Markdown?](#faq99)
* [(100) How can I synchronize Gmail categories?](#faq100)
* [(101) What does the blue/orange dot at the bottom of the conversations mean?](#faq101)
* [(102) How can I enable auto rotation of images?](#faq102)
@ -3851,16 +3851,18 @@ However, picking contacts is delegated to and done by Android and not by FairEma
<br />
<a name="faq99"></a>
**(99) Can you add a rich text or markdown editor?**
**(99) What should I know about Markdown?**
&#x1F30E; [Google Translate](https://translate.google.com/translate?sl=en&u=https%3A%2F%2Fm66b.github.io%2FFairEmail%2F%23faq99)
FairEmail provides common text formatting (bold, italic, underline, text size and color) via a toolbar that appears after selecting some text.
FairEmail provides common text formatting (bold, italic, underline, text size and color, etc.) via a toolbar that appears after selecting some text.
A [Rich text](https://en.wikipedia.org/wiki/Formatted_text) or [Markdown](https://en.wikipedia.org/wiki/Markdown) editor
would not be used by many people on a small mobile device and, more important,
Android doesn't support a rich text editor and most rich text editor open source projects are abandoned.
See [here](https://forum.xda-developers.com/showpost.php?p=79061829&postcount=4919) for some more details about this.
Alternatively, you can use [Markdown](https://en.wikipedia.org/wiki/Markdown).
You can enable Markdown support via the three-dot overflow menu at the top right of the message editor.
Please be aware that **normal styling will be ignored** when using Markdown, or, in other words, you can mix.
Markdown is an experimental feature.
<br />

@ -268,7 +268,7 @@ public class FragmentCompose extends FragmentBase {
private TextView tvResend;
private TextView tvPlainTextOnly;
private EditTextCompose etBody;
private ImageView ivMarkdown;
private ImageView ibMarkdown;
private TextView tvNoInternet;
private TextView tvSignature;
private CheckBox cbSignature;
@ -432,7 +432,7 @@ public class FragmentCompose extends FragmentBase {
tvResend = view.findViewById(R.id.tvResend);
tvPlainTextOnly = view.findViewById(R.id.tvPlainTextOnly);
etBody = view.findViewById(R.id.etBody);
ivMarkdown = view.findViewById(R.id.ivMarkdown);
ibMarkdown = view.findViewById(R.id.ibMarkdown);
tvNoInternet = view.findViewById(R.id.tvNoInternet);
tvSignature = view.findViewById(R.id.tvSignature);
cbSignature = view.findViewById(R.id.cbSignature);
@ -925,6 +925,13 @@ public class FragmentCompose extends FragmentBase {
}
});
ibMarkdown.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.viewFAQ(v.getContext(), 99);
}
});
if (compose_color != Color.TRANSPARENT)
tvSignature.setTextColor(compose_color);
tvSignature.setTypeface(StyleHelper.getTypeface(compose_font, getContext()));
@ -1225,7 +1232,7 @@ public class FragmentCompose extends FragmentBase {
tvPlainTextOnly.setVisibility(View.GONE);
etBody.setText(null);
etBody.setHint(null);
ivMarkdown.setVisibility(View.GONE);
ibMarkdown.setVisibility(View.GONE);
grpHeader.setVisibility(View.GONE);
grpExtra.setVisibility(View.GONE);
@ -6525,15 +6532,15 @@ public class FragmentCompose extends FragmentBase {
for (EntityAttachment attachment : attachments)
if (attachment.subsequence == null
? !attachment.isEncryption() &&
(cid.contains(attachment.cid) ||
!("reply".equals(action) || "reply_all".equals(action)))
(cid.contains(attachment.cid) ||
!("reply".equals(action) || "reply_all".equals(action)))
: "forward".equals(action) &&
tnef.size() == 1 &&
tnef.size() == 1 &&
attachment.sequence.equals(tnef.get(0).sequence) &&
!"subject.txt".equals(attachment.name) &&
!"body.html".equals(attachment.name) &&
!"body.rtf".equals(attachment.name) &&
!"attributes.txt".equals(attachment.name)) {
!"subject.txt".equals(attachment.name) &&
!"body.html".equals(attachment.name) &&
!"body.rtf".equals(attachment.name) &&
!"attributes.txt".equals(attachment.name)) {
if (attachment.available) {
File source = attachment.getFile(context);
@ -8376,7 +8383,7 @@ public class FragmentCompose extends FragmentBase {
etBody.setHint(hint);
grpBody.setVisibility(View.VISIBLE);
ivMarkdown.setVisibility(markdown ? View.VISIBLE : View.GONE);
ibMarkdown.setVisibility(markdown ? View.VISIBLE : View.GONE);
cbSignature.setChecked(draft.signature);
ibSignature.setEnabled(draft.signature);

@ -382,17 +382,18 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvPlainTextOnly" />
<ImageView
android:id="@+id/ivMarkdown"
<ImageButton
android:id="@+id/ibMarkdown"
android:layout_width="36dp"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/title_markdown"
android:tooltipText="@string/title_markdown"
app:layout_constraintEnd_toEndOf="@id/etBody"
app:layout_constraintTop_toTopOf="@id/etBody"
app:srcCompat="@drawable/twotone_data_array_24"
app:tint="?attr/colorSeparator" />
app:tint="?attr/colorWarning" />
<TextView
android:id="@+id/tvNoInternet"

@ -332,7 +332,7 @@
<li><a href="#faq96">(96) Where can I find the IMAP and SMTP settings?</a></li>
<li><a href="#faq97">(97) What is cleanup?</a></li>
<li><a href="#faq98">(98) Why can I still pick contacts after revoking contacts permissions?</a></li>
<li><a href="#faq99">(99) Can you add a rich text or markdown editor?</a></li>
<li><a href="#faq99">(99) What should I know about Markdown?</a></li>
<li><a href="#faq100">(100) How can I synchronize Gmail categories?</a></li>
<li><a href="#faq101">(101) What does the blue/orange dot at the bottom of the conversations mean?</a></li>
<li><a href="#faq102">(102) How can I enable auto rotation of images?</a></li>
@ -2047,10 +2047,12 @@ Y1 OK CAPABILITY completed</code></pre>
<p>🌎 <a href="https://translate.google.com/translate?sl=en&amp;u=https%3A%2F%2Fm66b.github.io%2FFairEmail%2F%23faq98">Google Translate</a></p>
<p>After revoking contacts permissions Android does not allow FairEmail access to your contacts anymore. However, picking contacts is delegated to and done by Android and not by FairEmail, so this will still be possible without contacts permissions.</p>
<p><br /></p>
<p><a name="faq99"></a> <strong>(99) Can you add a rich text or markdown editor?</strong></p>
<p><a name="faq99"></a> <strong>(99) What should I know about Markdown?</strong></p>
<p>🌎 <a href="https://translate.google.com/translate?sl=en&amp;u=https%3A%2F%2Fm66b.github.io%2FFairEmail%2F%23faq99">Google Translate</a></p>
<p>FairEmail provides common text formatting (bold, italic, underline, text size and color) via a toolbar that appears after selecting some text.</p>
<p>A <a href="https://en.wikipedia.org/wiki/Formatted_text">Rich text</a> or <a href="https://en.wikipedia.org/wiki/Markdown">Markdown</a> editor would not be used by many people on a small mobile device and, more important, Android doesnt support a rich text editor and most rich text editor open source projects are abandoned. See <a href="https://forum.xda-developers.com/showpost.php?p=79061829&amp;postcount=4919">here</a> for some more details about this.</p>
<p>FairEmail provides common text formatting (bold, italic, underline, text size and color, etc.) via a toolbar that appears after selecting some text.</p>
<p>Alternatively, you can use <a href="https://en.wikipedia.org/wiki/Markdown">Markdown</a>. You can enable Markdown support via the three-dot overflow menu at the top right of the message editor.</p>
<p>Please be aware that <strong>normal styling will be ignored</strong> when using Markdown, or, in other words, you can mix.</p>
<p>Markdown is an experimental feature.</p>
<p><br /></p>
<p><a name="faq100"></a> <strong>(100) How can I synchronize Gmail categories?</strong></p>
<p>🌎 <a href="https://translate.google.com/translate?sl=en&amp;u=https%3A%2F%2Fm66b.github.io%2FFairEmail%2F%23faq100">Google Translate</a></p>

Loading…
Cancel
Save