Giter Site home page Giter Site logo

niuware / tinytweetembed Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 2.0 26 KB

Plugin to embed tweets directly from TinyMCE.

License: GNU General Public License v3.0

HTML 4.84% JavaScript 74.30% PHP 20.86%
tinymce tweets tinymce-editor twitter twitter-api tweet-card

tinytweetembed's Introduction

tinyTweetEmbed

tinyTweetEmbed

tinyTweetEmbed is a simple plugin to embed tweets directly into your TinyMCE editor. Just copy the URL of the tweet and let this plugin transform it into an HTML Tweet card. It uses PHP to connect to the Twitter API to transform the URL. NO API keys required :)

Installation

Copy the plugin folder into the tinymce main plugin folder:

tinymce/plugins/twembed

Additionally copy the php, js and css files to the desired path. The php and theme paths can be configured in the js/tweetembed script file:

php/TweetEmbed.class.php  // Script to connect to Twitter API 
js/tweetembed.js          // Script to instantiate the tinymce and communicate with the PHP file
theme/                    // Styles for TinyMCE

Requirements

  1. jQuery
  2. TinyMCE
  3. Twitter Javascript API

Usage

  1. Open the Tweet Embed plugin navigating through the TinyMCE menubar Insert > Embed Tweet.
  2. Paste the url of your tweet (something like https://twitter.com/{username}/status/{status-id}).
    2.1 Optionally configure any desired advanced parameters for your embeded tweet.
  3. Click on "Get Tweet Code". After you see the embedcode then click "OK" to insert it into the editor.

tinyTweetEmbed dialog

You will see a simple design of the card inside the TinyMCE editor:

tinyTweetEmbed dialog

But in your website you will see the full tweet card like this:

tinyTweetEmbed dialog

Remember you need the Twitter Javascript API file in your live website in order to render the card correctly. Find out more here.

Example

If you download the repository, just open the index.html for a live example. Just add jQuery and the full tinymce script files to the project.

Author

This plugin was coded by Erik Lopez.

License

Licensed under GNU General Public License v 3.0

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.