ui: disable spellcheck for pertest (#629) (#630)

This commit is contained in:
panda authored and GitHub committed 2023-07-27 14:37:59 +08:00
1 parent 89b294c60e
commit f45a509c05
5 files changed
+8 -3

No files matched your search

@@ -16,6 +16,7 @@ export default function DataInputComponent(props) {
className="scratchpad__data-input" className="scratchpad__data-input"
style={{ overflowY: 'scroll' }} style={{ overflowY: 'scroll' }}
wrap="off" wrap="off"
spellCheck="false"
> >
{/* eslint-disable-next-line react/no-danger */} {/* eslint-disable-next-line react/no-danger */}
<pre dangerouslySetInnerHTML={{ __html: value }} contentEditable /> <pre dangerouslySetInnerHTML={{ __html: value }} contentEditable />
@@ -24,6 +25,7 @@ export default function DataInputComponent(props) {
<textarea <textarea
className="scratchpad__data-input" className="scratchpad__data-input"
wrap="off" wrap="off"
spellCheck="false"
value={value} value={value}
onChange={(ev) => { onChange={(ev) => {
ev.stopPropagation(); ev.stopPropagation();
@@ -172,6 +172,7 @@
{% macro textarea(args) %} {% macro textarea(args) %}
{% set markdown = args.markdown or false %} {% set markdown = args.markdown or false %}
{% set nospellcheck = args.nospellcheck or false %}
<div <div
name="form_item_{{ args.name }}" name="form_item_{{ args.name }}"
{{ container_attr('textarea-container', args) }} {{ container_attr('textarea-container', args) }}
@@ -180,6 +181,7 @@
name="{{ args.name }}" name="{{ args.name }}"
placeholder="{{ args.placeholder }}" placeholder="{{ args.placeholder }}"
{% if markdown %}data-markdown{% endif %} {% if markdown %}data-markdown{% endif %}
{% if nospellcheck %}spellcheck="false"{% endif %}
{{ form_attr('textbox', args) }} {{ form_attr('textbox', args) }}
>{{ args.value }}</textarea> >{{ args.value }}</textarea>
</div> </div>
@@ -11,7 +11,8 @@
{{ form.form_textarea({ {{ form.form_textarea({
columns:null, columns:null,
label:'Users', label:'Users',
name:'users' name:'users',
nospellcheck: true
}) }} }) }}
<div class="row"><div class="column"> <div class="row"><div class="column">
<button name="preview" class="rounded primary button">{{ _('Preview') }}</button> <button name="preview" class="rounded primary button">{{ _('Preview') }}</button>
@@ -9,7 +9,7 @@
</div> </div>
<div class="section__body"> <div class="section__body">
<form method="post" enctype="multipart/form-data"> <form method="post" enctype="multipart/form-data">
{{ form.form_textarea({label:'Input', columns:12, name:'input', extra_class:'monospace', autofocus:true}) }} {{ form.form_textarea({label:'Input', columns:12, name:'input', extra_class:'monospace', autofocus:true, nospellcheck:true}) }}
<div class="row"> <div class="row">
<div class="medium-12 columns"> <div class="medium-12 columns">
<p>{{ _('Or upload a file:') }} <input type="file" name="file"></p> <p>{{ _('Or upload a file:') }} <input type="file" name="file"></p>
@@ -18,7 +18,7 @@
}) }} }) }}
</div> </div>
<div class="row nojs--hide" id="codelang-selector"></div> <div class="row nojs--hide" id="codelang-selector"></div>
{{ form.form_textarea({label:'Code', columns:12, name:'code', extra_class:'monospace', autofocus:true}) }} {{ form.form_textarea({label:'Code', columns:12, name:'code', extra_class:'monospace', autofocus:true, nospellcheck:true}) }}
<div class="row"> <div class="row">
<div class="medium-12 columns"> <div class="medium-12 columns">
<p>{{ _('Or upload a file:') }} <input type="file" name="file"></p> <p>{{ _('Or upload a file:') }} <input type="file" name="file"></p>