fix: disable spellcheck on custom note title format
fix: open title format help page in new tab/window
This commit is contained in:
@@ -12,6 +12,8 @@ type Props = {
|
|||||||
|
|
||||||
const PrefChangeDebounceTimeInMs = 25
|
const PrefChangeDebounceTimeInMs = 25
|
||||||
|
|
||||||
|
const HelpPageUrl = 'https://day.js.org/docs/en/display/format#list-of-all-available-formats'
|
||||||
|
|
||||||
const CustomNoteTitleFormat = ({ application }: Props) => {
|
const CustomNoteTitleFormat = ({ application }: Props) => {
|
||||||
const [customNoteTitleFormat, setCustomNoteTitleFormat] = useState(() =>
|
const [customNoteTitleFormat, setCustomNoteTitleFormat] = useState(() =>
|
||||||
application.getPreference(PrefKey.CustomNoteTitleFormat, PrefDefaults[PrefKey.CustomNoteTitleFormat]),
|
application.getPreference(PrefKey.CustomNoteTitleFormat, PrefDefaults[PrefKey.CustomNoteTitleFormat]),
|
||||||
@@ -42,7 +44,17 @@ const CustomNoteTitleFormat = ({ application }: Props) => {
|
|||||||
<Subtitle>Custom Note Title Format</Subtitle>
|
<Subtitle>Custom Note Title Format</Subtitle>
|
||||||
<Text>
|
<Text>
|
||||||
All available date-time formatting options can be found{' '}
|
All available date-time formatting options can be found{' '}
|
||||||
<a className="underline" href="https://day.js.org/docs/en/display/format#list-of-all-available-formats">
|
<a
|
||||||
|
className="underline"
|
||||||
|
href={HelpPageUrl}
|
||||||
|
target="_blank"
|
||||||
|
onClick={(event) => {
|
||||||
|
if (application.isNativeMobileWeb()) {
|
||||||
|
event.preventDefault()
|
||||||
|
application.mobileDevice.openUrl(HelpPageUrl)
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
here
|
here
|
||||||
</a>
|
</a>
|
||||||
. Use square brackets (<code>[]</code>) to escape date-time formatting.
|
. Use square brackets (<code>[]</code>) to escape date-time formatting.
|
||||||
@@ -54,6 +66,7 @@ const CustomNoteTitleFormat = ({ application }: Props) => {
|
|||||||
value={customNoteTitleFormat}
|
value={customNoteTitleFormat}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
onBlur={setCustomNoteTitleFormatPreference}
|
onBlur={setCustomNoteTitleFormatPreference}
|
||||||
|
spellCheck={false}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-2">
|
<div className="mt-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user