clone of github.com/decent-newsroom/newsroom
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
1.4 KiB

<div class="panel-section" data-controller="editor--json-panel">
<h3>Raw Nostr Event</h3>
<p class="panel-help">
View and edit the raw Nostr event JSON. Changes here will override form values when publishing.
</p>
<div class="mb-3">
<button
type="button"
class="btn btn-sm btn-primary w-100"
data-action="click->editor--json-panel#regenerateJson"
>
Rebuild from form
</button>
</div>
<div class="json-editor-container">
<label for="json-editor-textarea" class="visually-hidden">Raw Nostr Event JSON</label>
<textarea
id="json-editor-textarea"
class="json-textarea"
data-editor--json-panel-target="jsonTextarea"
data-nostr--nostr-publish-target="jsonTextarea"
data-action="input->nostr--nostr-publish#onJsonInput input->editor--json-panel#onJsonInput"
rows="20"
spellcheck="false"
></textarea>
<div class="json-status" data-editor--json-panel-target="status"></div>
</div>
<div class="panel-help mt-2">
<small>
<strong>Required fields:</strong> kind, created_at, tags, content, pubkey<br>
<span class="text-warning" data-editor--json-panel-target="dirtyHint" style="display:none">
JSON modified - will override form values
</span>
</small>
</div>
</div>