In your main.js
:
import Editr from "./index.js";
Vue.use(Editr, {}); // config is optional. more below
In your components:
<Editr v-model="myHTML" />
{
hideModules: ["bold"],
image: {
uploadURL: "/api/myEndpoint"
}
}
Note on the image upload API endpoint:
- Image is uploaded by
multipart/form-data
- Your endpoint must respond back with a string, the URL for the image - e.g.
http://myapp.com/images/12345.jpg