Markdown improvements

master
M66B 3 months 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) * [(96) Where can I find the IMAP and SMTP settings?](#faq96)
* [(97) What is 'cleanup'?](#faq97) * [(97) What is 'cleanup'?](#faq97)
* [(98) Why can I still pick contacts after revoking contacts permissions?](#faq98) * [(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) * [(100) How can I synchronize Gmail categories?](#faq100)
* [(101) What does the blue/orange dot at the bottom of the conversations mean?](#faq101) * [(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) * [(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 /> <br />
<a name="faq99"></a> <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) &#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 Alternatively, you can use [Markdown](https://en.wikipedia.org/wiki/Markdown).
would not be used by many people on a small mobile device and, more important, You can enable Markdown support via the three-dot overflow menu at the top right of the message editor.
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. 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 /> <br />

@ -268,7 +268,7 @@ public class FragmentCompose extends FragmentBase {
private TextView tvResend; private TextView tvResend;
private TextView tvPlainTextOnly; private TextView tvPlainTextOnly;
private EditTextCompose etBody; private EditTextCompose etBody;
private ImageView ivMarkdown; private ImageView ibMarkdown;
private TextView tvNoInternet; private TextView tvNoInternet;
private TextView tvSignature; private TextView tvSignature;
private CheckBox cbSignature; private CheckBox cbSignature;
@ -432,7 +432,7 @@ public class FragmentCompose extends FragmentBase {
tvResend = view.findViewById(R.id.tvResend); tvResend = view.findViewById(R.id.tvResend);
tvPlainTextOnly = view.findViewById(R.id.tvPlainTextOnly); tvPlainTextOnly = view.findViewById(R.id.tvPlainTextOnly);
etBody = view.findViewById(R.id.etBody); etBody = view.findViewById(R.id.etBody);
ivMarkdown = view.findViewById(R.id.ivMarkdown); ibMarkdown = view.findViewById(R.id.ibMarkdown);
tvNoInternet = view.findViewById(R.id.tvNoInternet); tvNoInternet = view.findViewById(R.id.tvNoInternet);
tvSignature = view.findViewById(R.id.tvSignature); tvSignature = view.findViewById(R.id.tvSignature);
cbSignature = view.findViewById(R.id.cbSignature); 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) if (compose_color != Color.TRANSPARENT)
tvSignature.setTextColor(compose_color); tvSignature.setTextColor(compose_color);
tvSignature.setTypeface(StyleHelper.getTypeface(compose_font, getContext())); tvSignature.setTypeface(StyleHelper.getTypeface(compose_font, getContext()));
@ -1225,7 +1232,7 @@ public class FragmentCompose extends FragmentBase {
tvPlainTextOnly.setVisibility(View.GONE); tvPlainTextOnly.setVisibility(View.GONE);
etBody.setText(null); etBody.setText(null);
etBody.setHint(null); etBody.setHint(null);
ivMarkdown.setVisibility(View.GONE); ibMarkdown.setVisibility(View.GONE);
grpHeader.setVisibility(View.GONE); grpHeader.setVisibility(View.GONE);
grpExtra.setVisibility(View.GONE); grpExtra.setVisibility(View.GONE);
@ -8376,7 +8383,7 @@ public class FragmentCompose extends FragmentBase {
etBody.setHint(hint); etBody.setHint(hint);
grpBody.setVisibility(View.VISIBLE); grpBody.setVisibility(View.VISIBLE);
ivMarkdown.setVisibility(markdown ? View.VISIBLE : View.GONE); ibMarkdown.setVisibility(markdown ? View.VISIBLE : View.GONE);
cbSignature.setChecked(draft.signature); cbSignature.setChecked(draft.signature);
ibSignature.setEnabled(draft.signature); ibSignature.setEnabled(draft.signature);

@ -382,17 +382,18 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvPlainTextOnly" /> app:layout_constraintTop_toBottomOf="@id/tvPlainTextOnly" />
<ImageView <ImageButton
android:id="@+id/ivMarkdown" android:id="@+id/ibMarkdown"
android:layout_width="36dp" android:layout_width="36dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="6dp" android:layout_marginTop="6dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/title_markdown" android:contentDescription="@string/title_markdown"
android:tooltipText="@string/title_markdown" android:tooltipText="@string/title_markdown"
app:layout_constraintEnd_toEndOf="@id/etBody" app:layout_constraintEnd_toEndOf="@id/etBody"
app:layout_constraintTop_toTopOf="@id/etBody" app:layout_constraintTop_toTopOf="@id/etBody"
app:srcCompat="@drawable/twotone_data_array_24" app:srcCompat="@drawable/twotone_data_array_24"
app:tint="?attr/colorSeparator" /> app:tint="?attr/colorWarning" />
<TextView <TextView
android:id="@+id/tvNoInternet" 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="#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="#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="#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="#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="#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> <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>🌎 <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>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><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>🌎 <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>FairEmail provides common text formatting (bold, italic, underline, text size and color, etc.) 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 doesn’t 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>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><br /></p>
<p><a name="faq100"></a> <strong>(100) How can I synchronize Gmail categories?</strong></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> <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