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

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

Merged
merged 3 commits into from Apr 14, 2018

Conversation

3 participants
@Abijeet
Member

Abijeet commented Mar 27, 2018

Fixes #266

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

screenshot-2018-3-28 editing page new page bookstack

I've had to add an ugly hacky fix to remove the "Advanced" tab and the "Open" button,
6f280bb#diff-4fd06e033e83fb244f4d8c9752a26781R315

Otherwise this is how the default media dialog looks like with the open button not really doing anything.

screenshot-2018-3-28 editing page new page bookstack 1

@Abijeet Abijeet self-assigned this Mar 27, 2018

@Abijeet Abijeet requested a review from ssddanbrown Mar 27, 2018

@ssddanbrown

Awesome, Thanks for this.
Added a comment for the tab css as not sure if needed.

display: none;
}
.mce-tab:last-of-type {
display: none;

This comment has been minimized.

@ssddanbrown

ssddanbrown Mar 27, 2018

Member

From a quick test not sure this rule to hide the tab is needed, I think the tab hides itself when both:

media_alt_source: false,
media_poster: false,

Are set.

Only quickly tested in codepen myself though.

@Abijeet

This comment has been minimized.

Member

Abijeet commented Mar 28, 2018

@ssddanbrown - Thanks for the quick review. I did try that, but the advanced tab was still visible. As per the changelog this was fixed in TinyMCE Version 4.7.7 released on February 19, 2018.

Search for -

fixed a bug where the advanced tab in the Media Plugin was being shown even if it didn't contain anything. Patch contributed by gabrieeel.

We are using version 4.6.6 (2017-08-30).

Maybe its time to upgrade?

@ssddanbrown

This comment has been minimized.

Member

ssddanbrown commented Mar 28, 2018

@Abijeet ah, Makes sense. Yeah, Upgrading is probably a good idea, Think it's been a few releases since last TinyMCE upgrade.

@Abijeet

This comment has been minimized.

Member

Abijeet commented Mar 28, 2018

Done, I've updated to 4.7.9. I've removed box-shadow that was appearing around the TinyMCE toolbar.

I've tested the following functionality on Firefox 59.0.1,

  • Ordered list
  • Inserting image
  • Full-screen
  • Inserting a simple diagram
  • Insert / Edit link
  • Code blocks
  • Call-outs

@Abijeet Abijeet closed this Mar 28, 2018

@Abijeet Abijeet reopened this Mar 28, 2018

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

@ssddanbrown

This comment has been minimized.

Member

ssddanbrown commented Apr 1, 2018

@Abijeet Sorry but I've just made this a little more difficult to merge after pushing 736d711 up.

Will need to move the resources/assets/js/pages/page-form.js changes to resources/assets/js/components/wysiwyg-editor.js.

@Abijeet

This comment has been minimized.

Member

Abijeet commented Apr 3, 2018

@ssddanbrown - No problem, will take care of it this weekend.

@mendiromania

This comment has been minimized.

mendiromania commented Apr 14, 2018

rip

Abijeet added some commits Mar 27, 2018

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

Signed-off-by: Abijeet <abijeetpatro@gmail.com>
Updated the TinyMCE to version 4.7.9.
Added some code to remove the box-shadow around the TinyMCE toolbar.

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

@Abijeet Abijeet force-pushed the feature/tinymce-insert-video branch from 0226bb4 to 93f92e9 Apr 14, 2018

Moved the code to the wysiwyg-editor file.
Signed-off-by: Abijeet <abijeetpatro@gmail.com>
@Abijeet

This comment has been minimized.

Member

Abijeet commented Apr 14, 2018

@ssddanbrown - Done!

@ssddanbrown

This comment has been minimized.

Member

ssddanbrown commented Apr 14, 2018

@Abijeet Awesome, Thanks!

@ssddanbrown ssddanbrown merged commit fb18576 into master Apr 14, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@ssddanbrown ssddanbrown deleted the feature/tinymce-insert-video branch Apr 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment