GithubHelp home page GithubHelp logo

media-browser's Introduction

tweedegolf-media-browser

Frond-end scripts for the tweedegolf media bundle. See the tweedegolf media bundle for a complete installation guide and documentation.

Installation and configuration

Add the media bundle to bower.json:

{
    "dependencies": {
        "tweedegolf-media-browser": "0.1.0"
    }
}

Usage

The media browser provides a scss file with styling and a javascript file that exposes a callback for tinyMCE. Example usage:

var $ = require('jquery');
window.jQuery = window.$ = $; // required for bootstrap

require('bootstrap-sass-twbs/assets/javascripts/bootstrap');
require('tinymce/jquery.tinymce.min');
var media_callback = require('tweedegolf-media-browser').tinymce_callback('/api/modal');

$(function () {

    var tinymce_config = {
        theme: 'modern',
        plugins: 'link image',
        file_browser_callback: media_callback
    };

    $('.tinymce').tinymce(tinymce_config);

);

media-browser's People

Contributors

marlonbaeten avatar

Stargazers

Mihai Nica avatar Yanko Simeonoff avatar

Watchers

Ruben Nijveld avatar James Cloos avatar  avatar  avatar

Forkers

garak

media-browser's Issues

Uncaught ReferenceError: require is not defined

Hello, I'm not sure I understood well, the documentation is very unclear to me :
I loaded media.js and main.js and I got this error in Developer Tools as require is not a browser side function. Moreover, installing via bower requires to use your own jquery for example as it is exported. Theres is nothing in the documentation to help integrating your work. Still remains blury to me.
Do you have examples to provide please ? It would be very helpfull.
Thank you

Not working with TinyMCE 4.2

I tried to get this working with current last release of TinyMCE, but it's not working.
I'm using this scripts with media-bundle (in a Symfony project), and with latest TinyMCE the image is simply not inserted in the "textarea". No errors in console.
Reverting to 4.1 is OK, but it would be nice to get it working with 4.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.