mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Change nunjucks preview box to <textarea> (Closes #904)
This commit is contained in:
parent
bd683a7d1c
commit
4bd9b166cf
2
package-lock.json
generated
2
package-lock.json
generated
@ -1703,7 +1703,7 @@
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
},
|
||||
"cryptiles": {
|
||||
"cryptile": {
|
||||
"version": "2.0.5",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
|
@ -564,22 +564,15 @@ class TagEditor extends React.PureComponent<Props, State> {
|
||||
let previewElement;
|
||||
if (error) {
|
||||
previewElement = (
|
||||
<pre>
|
||||
<code className="block danger selectable">{error || <span> </span>}</code>
|
||||
</pre>
|
||||
<textarea className="danger" value={error || 'Error'} readOnly/>
|
||||
);
|
||||
} else if (rendering) {
|
||||
previewElement = (
|
||||
<pre>
|
||||
<code className="block"><span className="faint italic">rendering...</span></code>
|
||||
</pre>
|
||||
<textarea value="rendering..." readOnly/>
|
||||
);
|
||||
} else {
|
||||
previewElement = (
|
||||
<pre>
|
||||
<code className="block selectable scrollable force-wrap">{preview ||
|
||||
<span> </span>}</code>
|
||||
</pre>
|
||||
<textarea value={preview || 'error'} readOnly rows={5}/>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -93,8 +93,8 @@ class VariableEditor extends PureComponent {
|
||||
<div className="form-control form-control--outlined">
|
||||
<label>Live Preview
|
||||
{error
|
||||
? <code className="block danger selectable">{error || <span> </span>}</code>
|
||||
: <code className="block selectable">{preview || <span> </span>}</code>
|
||||
? <textarea className="danger" value={error || 'Error'} readOnly/>
|
||||
: <textarea value={preview || ''} readOnly/>
|
||||
}
|
||||
</label>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user