Setting Up Image Uploads

Uploaded images are sent to a temporary upload folder that stores images for 24 hours until you set an upload folder.

To permanently store images for your editor on the hosted editor service, you can set up an upload folder. You get 1GB of free upload space for your editor. The files can be moved to anywhere you like if at any time you

Sign In to Wysimark

You can sign in to the Wysimark Admin by visiting https://admin.wysimark.com/.

Once you are there, if you aren't signed in, you have the option to sign in using:

  • GitHub

  • Google

  • Email/Password

Since most developers have a GitHub account and is probably kept secure, GitHub is a good choice to get started quickly.

New Wysimark App

An App represents the app/program/website that Wysimark will be used in. Create a new Wysimark App by clicking the + New App button.

Enter a name for the app that contains only letters, numbers and dashes. The app name will make up part of the URL of your uploaded files.

Once you're finished, you'll see instructions on how to add the app name to the editor. The instructions will look something like this:

import { Editor, useEditor } from 'wysimark'

const App = () => {

  // set initial markdown here
  const editor = useEditor("# Heading...")
  
  // get markdown in editor 
  const save = () => {
    const markdown = editor.getMarkdown()
    console.log(markdown)
  }
  
  return <div>
    { /* Note: App name is passed in below */ }
    <Editor editor={editor} app="your-app-name-goes-here" />
    <button onClick={save}>Submit</button>
  </div>
}

Notice that the Editor component has an attribute named app.

Restricting Image Uploads to Specific Domains

Last updated