Plugin: Note Preview

This is a plugin that lets you immediately view previews from within the post form.

Installation

Go to Settings -> Plugins -> Install Plugins and paste the following code into the text box:

### {
  id: "8ec6c410-67b8-11eb-ae93-0242ac130002"
  name: "Basically Preview EN"
  version: "1.0.0"
  author:  "robflop"
  description: "Displays previews in the center due to specification"
  permission: []
  config: {
    show_when_posting: {
      type: "boolean"
      label: "Show confirmation before posting"
     }
  }
}

@preview(note) {
  Mk:dialog("" note.text "")
  note
}

@preview_with_confirm(note) {
  ? Mk:confirm("Post confirmation" `{note.text}{Str:lf}The note will be sent like this.`) {
    <<note
  }
  _
}

Plugin:register_post_form_action("Basically Preview EN" preview)
? Plugin:config.show_when_posting { 
  Plugin:register_note_post_interruptor(preview_with_confirm)
}

This is a plugin that lets you immediately view previews from within the post form. The preview dialog will however always appear in the center of the screen due to the AiScript specification😭

Thus "Basically"...

You can enable always showing a preview before submitting a post by going to:

and then enabling the "Show confirmation before posting" option there.

(If you click "Cancel" on the dialog that appears before sending a post an error will appear, but this is normal and can be ignored)

🙂 How to use

Original JP Source: https://misskey.io/@hakohako_f2/pages/notePreview
Author: @hakohako_f2

Translated Source: https://misskey.io/@robflop/pages/notePreviewEN
Translator: @robflop


Revision #2
Created 9 August 2021 11:32:36 by fristi
Updated 14 August 2021 20:31:33 by fristi