docs: add images example

This commit is contained in:
Hans Pagel
2021-02-03 10:48:58 +01:00
parent 8f4ae1fab1
commit 5fa89f3ea3
5 changed files with 99 additions and 1 deletions

View File

@@ -31,7 +31,9 @@ export default {
addImage() {
const url = window.prompt('URL')
this.editor.chain().focus().setImage({ src: url }).run()
if (url) {
this.editor.chain().focus().setImage({ src: url }).run()
}
},
},
@@ -68,6 +70,10 @@ export default {
img {
max-width: 100%;
height: auto;
&.ProseMirror-selectednode {
outline: 3px solid #68CEF8;
}
}
}
</style>