Skip to content

Manage Media from frontend easily? #17392

Answered by Piedone
RemcoW2002 asked this question in Q&A
Discussion options

You must be logged in to vote

Pasting images into editors in a way that they're saved to the Media Library as files is not supported (#6145). However, with Trumbowyg fields (the built-in HTML WYSIWYG editor), you can paste images as base64-encoded URLs (i.e. the files will be embedded into the markup, as opposed to saved as files). This is less efficient, just FYI.

You can use OC's built-in MarkdownBodyPart to provide a base of the editor, and add something that'll upload pasted images (the editor plugin used is EasyMDE; check out what other people have done on this front from here: Ionaru/easy-markdown-editor#7 (comment)).

When working with content items on the frontend, keep security in mind, and e.g. don't let peop…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@RemcoW2002
Comment options

@Piedone
Comment options

@RemcoW2002
Comment options

@Piedone
Comment options

Answer selected by RemcoW2002
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants