New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add ability to insert video #266

Closed
olexus opened this Issue Jan 9, 2017 · 10 comments

Comments

@olexus
Contributor

olexus commented Jan 9, 2017

For Feature Requests

It would be great to add the ability to insert video in pages. I did this using tinymce media plugin, but little uncomfortably.

@jeffreywyman

This comment has been minimized.

jeffreywyman commented Apr 4, 2017

Would be cool. What is the best alternative currently? Embed, or just link to video?

@Shackelford-Arden

This comment has been minimized.

Shackelford-Arden commented May 23, 2017

@jeffreywyman Embedding and linking are the two current options.

I add my voice to being able to simply insert a video. Would be interesting if you could provide an option to look "locally" on the server for media as well. Kind of similar to how you do it with images.

@Floppybobby

This comment has been minimized.

Floppybobby commented Dec 11, 2017

How exactly do you embed video using the tinymce media plugin ? It seems like BookStack comes with that plugin by default, but I'm still not able to embed video.

@dennis1502

This comment has been minimized.

dennis1502 commented Dec 12, 2017

@Floppybobby I made it to turn on the default media plugin in TinyMCE by doing the following:

In public > js > common.js
Add the 'media' parameter to the plugins and the toolbar option
Then run: npm run-script build if you ar not watching already

Output:
screen shot 2017-12-12 at 13 50 44

Source: https://www.tinymce.com/docs/plugins/media/

@ensemblebd

This comment has been minimized.

ensemblebd commented Jan 3, 2018

@dennis1502 solid working solution. Mucho gracias 👍

Modify: /resources/assets/js/pages/page-form.js (as described)
Then on root path:
npm install && npm run production
public/js/common.js receives new compressed output.

@henkedk

This comment has been minimized.

henkedk commented Jan 22, 2018

If you're not running with npm, or just feel like it, you can edit public/js/common.js directly and add 'media' to 'plugins' and 'toolbar' - works.

@fivestones

This comment has been minimized.

fivestones commented Feb 14, 2018

I'm running bookstack in docker. I edited public/js/common.js as described by @henkedk and @dennis1502 but I don't see any difference afterward. Do I need to restart bookstack somehow? (I did restart the docker container after editing but still didn't see any difference.)

Also, maybe I'm editing wrong. In common.js I see:
plugins:c,imagetools_toolbar:"imageoptions",toolbar:"undo redo | styleselect |
and changed this to
plugins:media,c,imagetools_toolbar:"imageoptions",toolbar:"media undo redo | styleselect |
Did I do this right? I'm not sure of the syntax since it's all minified.
Thanks!

@ensemblebd

This comment has been minimized.

ensemblebd commented Feb 14, 2018

in latest version plugins property was moved up in scope to a variable, you'll have to search for var c=" instead (may differ between minifications via gulp, your snippet labels it "c", as in: plugins:c, ), it'll be a long string value containing the plugins.
Toolbar you edited correctly though

Edit:
My hope, is that maintainers will move it up to an admin-area editable field via database or config .env var. That way we can edit these from the admin area via GUI.
I believe that may be in the works, since they moved the string to a js variable out of normal scoping.
If not, well I'm sure one of us if not myself will make a PR for it.

@Abijeet

This comment has been minimized.

Member

Abijeet commented Mar 11, 2018

@ssddanbrown - I'd like to take a crack at this. Do you think for now adding just the media plugin to TinyMCE is OK, or would you want a full fledged media library like we have for images? Maybe update the current image library to handle both?

@ssddanbrown

This comment has been minimized.

Member

ssddanbrown commented Mar 12, 2018

@Abijeet Okay, Thanks. Just the media plugin should be fine. I think a full-fledged media library may not be worth it for videos as most shared videos won't be in standard file format but a range of embedd-able iframes. A lot more variance compare to images.

@Abijeet Abijeet self-assigned this Mar 26, 2018

Abijeet added a commit that referenced this issue Mar 27, 2018

Adds the media plugin to TinyMCE to allow insertion of videos.
Fixes #266

Signed-off-by: Abijeet <abijeetpatro@gmail.com>

@ssddanbrown ssddanbrown added this to the BookStack Beta v0.21.0 milestone Mar 30, 2018

Abijeet added a commit that referenced this issue Apr 14, 2018

Adds the media plugin to TinyMCE to allow insertion of videos.
Fixes #266

Signed-off-by: Abijeet <abijeetpatro@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment