Submit Search
Upload
Wysiwig on Rails
•
1 like
•
1,457 views
Seiji Takahashi
Follow
Wysiwig on Rails @Roppongi.rb#1のLT資料です。
Read less
Read more
Engineering
Report
Share
Report
Share
1 of 30
Download now
Download to read offline
Recommended
Training Slides: Tungsten Replicator AMI - The Getting Started Guide
Training Slides: Tungsten Replicator AMI - The Getting Started Guide
Continuent
Amazon inspector で自動セキュリティ診断
Amazon inspector で自動セキュリティ診断
Ryo Shibayama
ElasticBeanstalk で新規事業を爆速ローンチする
ElasticBeanstalk で新規事業を爆速ローンチする
Ryo Shibayama
Vue.js + Vuexチーム開発実践の事例
Vue.js + Vuexチーム開発実践の事例
treby
Try to use chromeless on AWS Lambda
Try to use chromeless on AWS Lambda
Ryo Shibayama
How to create plugins for Lokka, Ruby CMS that can run on Heroku
How to create plugins for Lokka, Ruby CMS that can run on Heroku
Junya Ishihara
WordPress: Getting Under the Hood
WordPress: Getting Under the Hood
Scott Taylor
Building Awesome APIs in Grails
Building Awesome APIs in Grails
clatimer
Recommended
Training Slides: Tungsten Replicator AMI - The Getting Started Guide
Training Slides: Tungsten Replicator AMI - The Getting Started Guide
Continuent
Amazon inspector で自動セキュリティ診断
Amazon inspector で自動セキュリティ診断
Ryo Shibayama
ElasticBeanstalk で新規事業を爆速ローンチする
ElasticBeanstalk で新規事業を爆速ローンチする
Ryo Shibayama
Vue.js + Vuexチーム開発実践の事例
Vue.js + Vuexチーム開発実践の事例
treby
Try to use chromeless on AWS Lambda
Try to use chromeless on AWS Lambda
Ryo Shibayama
How to create plugins for Lokka, Ruby CMS that can run on Heroku
How to create plugins for Lokka, Ruby CMS that can run on Heroku
Junya Ishihara
WordPress: Getting Under the Hood
WordPress: Getting Under the Hood
Scott Taylor
Building Awesome APIs in Grails
Building Awesome APIs in Grails
clatimer
Making maven and grunt play nice
Making maven and grunt play nice
Zoran Nikolovski
eMusic: WordPress in the Enterprise
eMusic: WordPress in the Enterprise
Scott Taylor
[Start] Playing
[Start] Playing
佑介 九岡
SPSNJ 2014: EmberJS & SharePoint
SPSNJ 2014: EmberJS & SharePoint
Greg Hurlman
2010.09.02 LT Doc fluxflex on JAWS-UG
2010.09.02 LT Doc fluxflex on JAWS-UG
Hiro Fukami
Riding IronRuby on Rails
Riding IronRuby on Rails
Shay Friedman
Ember and SharePoint
Ember and SharePoint
Greg Hurlman
ASP.NET MVC
ASP.NET MVC
Shay Friedman
Signature
Signature
Keishin Yokomaku
Working with Git
Working with Git
Tony Hillerson
In-house web automation?
In-house web automation?
Adam Christian
Better framework, better life
Better framework, better life
Daniel Lv
Better Framework Better Life
Better Framework Better Life
jeffz
WordPress Development Environments
WordPress Development Environments
Josh Cummings
DeveloperDeveloperDeveloper! Sydney 2012
DeveloperDeveloperDeveloper! Sydney 2012
kittenthecat
Building Elixir App Release with Distillery and Docker
Building Elixir App Release with Distillery and Docker
Mickey Chen
2015 WordCamp Maine Keynote
2015 WordCamp Maine Keynote
Scott Taylor
Angular2 + AWS Lambdaでサーバサイドレンダリングしてみた
Angular2 + AWS Lambdaでサーバサイドレンダリングしてみた
暁 三宅
Live Coverage at The New York Times
Live Coverage at The New York Times
Scott Taylor
Deployment Nirvana
Deployment Nirvana
Adrian Pike
Concept of BlockChain & Decentralized Application
Concept of BlockChain & Decentralized Application
Seiji Takahashi
お前なんかハッカーじゃない╭( ・ㅂ・)و ̑̑
お前なんかハッカーじゃない╭( ・ㅂ・)و ̑̑
Seiji Takahashi
More Related Content
What's hot
Making maven and grunt play nice
Making maven and grunt play nice
Zoran Nikolovski
eMusic: WordPress in the Enterprise
eMusic: WordPress in the Enterprise
Scott Taylor
[Start] Playing
[Start] Playing
佑介 九岡
SPSNJ 2014: EmberJS & SharePoint
SPSNJ 2014: EmberJS & SharePoint
Greg Hurlman
2010.09.02 LT Doc fluxflex on JAWS-UG
2010.09.02 LT Doc fluxflex on JAWS-UG
Hiro Fukami
Riding IronRuby on Rails
Riding IronRuby on Rails
Shay Friedman
Ember and SharePoint
Ember and SharePoint
Greg Hurlman
ASP.NET MVC
ASP.NET MVC
Shay Friedman
Signature
Signature
Keishin Yokomaku
Working with Git
Working with Git
Tony Hillerson
In-house web automation?
In-house web automation?
Adam Christian
Better framework, better life
Better framework, better life
Daniel Lv
Better Framework Better Life
Better Framework Better Life
jeffz
WordPress Development Environments
WordPress Development Environments
Josh Cummings
DeveloperDeveloperDeveloper! Sydney 2012
DeveloperDeveloperDeveloper! Sydney 2012
kittenthecat
Building Elixir App Release with Distillery and Docker
Building Elixir App Release with Distillery and Docker
Mickey Chen
2015 WordCamp Maine Keynote
2015 WordCamp Maine Keynote
Scott Taylor
Angular2 + AWS Lambdaでサーバサイドレンダリングしてみた
Angular2 + AWS Lambdaでサーバサイドレンダリングしてみた
暁 三宅
Live Coverage at The New York Times
Live Coverage at The New York Times
Scott Taylor
Deployment Nirvana
Deployment Nirvana
Adrian Pike
What's hot
(20)
Making maven and grunt play nice
Making maven and grunt play nice
eMusic: WordPress in the Enterprise
eMusic: WordPress in the Enterprise
[Start] Playing
[Start] Playing
SPSNJ 2014: EmberJS & SharePoint
SPSNJ 2014: EmberJS & SharePoint
2010.09.02 LT Doc fluxflex on JAWS-UG
2010.09.02 LT Doc fluxflex on JAWS-UG
Riding IronRuby on Rails
Riding IronRuby on Rails
Ember and SharePoint
Ember and SharePoint
ASP.NET MVC
ASP.NET MVC
Signature
Signature
Working with Git
Working with Git
In-house web automation?
In-house web automation?
Better framework, better life
Better framework, better life
Better Framework Better Life
Better Framework Better Life
WordPress Development Environments
WordPress Development Environments
DeveloperDeveloperDeveloper! Sydney 2012
DeveloperDeveloperDeveloper! Sydney 2012
Building Elixir App Release with Distillery and Docker
Building Elixir App Release with Distillery and Docker
2015 WordCamp Maine Keynote
2015 WordCamp Maine Keynote
Angular2 + AWS Lambdaでサーバサイドレンダリングしてみた
Angular2 + AWS Lambdaでサーバサイドレンダリングしてみた
Live Coverage at The New York Times
Live Coverage at The New York Times
Deployment Nirvana
Deployment Nirvana
Viewers also liked
Concept of BlockChain & Decentralized Application
Concept of BlockChain & Decentralized Application
Seiji Takahashi
お前なんかハッカーじゃない╭( ・ㅂ・)و ̑̑
お前なんかハッカーじゃない╭( ・ㅂ・)و ̑̑
Seiji Takahashi
Excelの話
Excelの話
Yoshiki Shibukawa
Blockchain: The Information Technology of the Future
Blockchain: The Information Technology of the Future
Melanie Swan
アクセシビリティはじめました
アクセシビリティはじめました
Yuichi Sugiyama
BCU30 - Webでできるマルチメディア表現
BCU30 - Webでできるマルチメディア表現
Leonardo Ken Orihara
Serverside ES6@Livesense technight
Serverside ES6@Livesense technight
Seiji Takahashi
機械学習で大事なことをミニGunosyをつくって学んだ╭( ・ㅂ・)و ̑̑
機械学習で大事なことをミニGunosyをつくって学んだ╭( ・ㅂ・)و ̑̑
Seiji Takahashi
日本のIT市場のトピックス
日本のIT市場のトピックス
Hiroyasu NOHATA
Etherem ~ agvm
Etherem ~ agvm
gha sshee
Ethereum @ descon 2016
Ethereum @ descon 2016
Predrag Radović
Dapps for Web Developers Aberdeen Techmeetup
Dapps for Web Developers Aberdeen Techmeetup
James Littlejohn
Solidity intro
Solidity intro
Angello Pozo
Etherisc Versicherung neu erfinden
Etherisc Versicherung neu erfinden
Stephan Karpischek
Vision for a health blockchain
Vision for a health blockchain
James Littlejohn
Introduction to Idea
Introduction to Idea
James Littlejohn
"Performance Analysis of In-Network Caching in Content-Centric Advanced Meter...
"Performance Analysis of In-Network Caching in Content-Centric Advanced Meter...
Khaled Ben Driss
The Ethereum ÐApp IDE: Mix
The Ethereum ÐApp IDE: Mix
gavofyork
NodeJS Blockchain.info Wallet
NodeJS Blockchain.info Wallet
Sjors Provoost
Everything dApp (Blockchain University Module II)
Everything dApp (Blockchain University Module II)
Tom Ding
Viewers also liked
(20)
Concept of BlockChain & Decentralized Application
Concept of BlockChain & Decentralized Application
お前なんかハッカーじゃない╭( ・ㅂ・)و ̑̑
お前なんかハッカーじゃない╭( ・ㅂ・)و ̑̑
Excelの話
Excelの話
Blockchain: The Information Technology of the Future
Blockchain: The Information Technology of the Future
アクセシビリティはじめました
アクセシビリティはじめました
BCU30 - Webでできるマルチメディア表現
BCU30 - Webでできるマルチメディア表現
Serverside ES6@Livesense technight
Serverside ES6@Livesense technight
機械学習で大事なことをミニGunosyをつくって学んだ╭( ・ㅂ・)و ̑̑
機械学習で大事なことをミニGunosyをつくって学んだ╭( ・ㅂ・)و ̑̑
日本のIT市場のトピックス
日本のIT市場のトピックス
Etherem ~ agvm
Etherem ~ agvm
Ethereum @ descon 2016
Ethereum @ descon 2016
Dapps for Web Developers Aberdeen Techmeetup
Dapps for Web Developers Aberdeen Techmeetup
Solidity intro
Solidity intro
Etherisc Versicherung neu erfinden
Etherisc Versicherung neu erfinden
Vision for a health blockchain
Vision for a health blockchain
Introduction to Idea
Introduction to Idea
"Performance Analysis of In-Network Caching in Content-Centric Advanced Meter...
"Performance Analysis of In-Network Caching in Content-Centric Advanced Meter...
The Ethereum ÐApp IDE: Mix
The Ethereum ÐApp IDE: Mix
NodeJS Blockchain.info Wallet
NodeJS Blockchain.info Wallet
Everything dApp (Blockchain University Module II)
Everything dApp (Blockchain University Module II)
Similar to Wysiwig on Rails
Rapid development with Rails
Rapid development with Rails
Yi-Ting Cheng
Contributing to rails
Contributing to rails
Lukas Eppler
Impression of Rails 3
Impression of Rails 3
Kosuke Matsuda
Plone for Education: Bibliographies
Plone for Education: Bibliographies
Cristopher Ewing
OSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy Hawkins
NETWAYS
44 Slides About 22 Modules
44 Slides About 22 Modules
heyrocker
WordPress Rest API
WordPress Rest API
Brian Layman
[.Net开发交流会][2010.06.19]better framework better life(吕国宁)
[.Net开发交流会][2010.06.19]better framework better life(吕国宁)
Shanda innovation institute
Scaling with swagger
Scaling with swagger
Tony Tam
Alloy - Codestrong 2012
Alloy - Codestrong 2012
Tony Lukasavage
Codestrong 2012 breakout session alloy (mvc) app framework overview
Codestrong 2012 breakout session alloy (mvc) app framework overview
Axway Appcelerator
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails Ecosystem
Yi-Ting Cheng
Managing Multiple WordPress Websites in 2017
Managing Multiple WordPress Websites in 2017
South Florida Web Studio
Selenium WebDriverを利用したサンプルアプリケーションのテスト
Selenium WebDriverを利用したサンプルアプリケーションのテスト
Atsushi Matsuo
Alloy Framework
Alloy Framework
Mads Møller
Azureサーバーレスで行う情報のスクリーニング
Azureサーバーレスで行う情報のスクリーニング
ryosuke matsumura
Single Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.Web
Chris Canal
Project Tools in Web Development
Project Tools in Web Development
kmloomis
海纳百川,有容乃大
海纳百川,有容乃大
hujinpu
Rack
Rack
shaokun
Similar to Wysiwig on Rails
(20)
Rapid development with Rails
Rapid development with Rails
Contributing to rails
Contributing to rails
Impression of Rails 3
Impression of Rails 3
Plone for Education: Bibliographies
Plone for Education: Bibliographies
OSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy Hawkins
44 Slides About 22 Modules
44 Slides About 22 Modules
WordPress Rest API
WordPress Rest API
[.Net开发交流会][2010.06.19]better framework better life(吕国宁)
[.Net开发交流会][2010.06.19]better framework better life(吕国宁)
Scaling with swagger
Scaling with swagger
Alloy - Codestrong 2012
Alloy - Codestrong 2012
Codestrong 2012 breakout session alloy (mvc) app framework overview
Codestrong 2012 breakout session alloy (mvc) app framework overview
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails Ecosystem
Managing Multiple WordPress Websites in 2017
Managing Multiple WordPress Websites in 2017
Selenium WebDriverを利用したサンプルアプリケーションのテスト
Selenium WebDriverを利用したサンプルアプリケーションのテスト
Alloy Framework
Alloy Framework
Azureサーバーレスで行う情報のスクリーニング
Azureサーバーレスで行う情報のスクリーニング
Single Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.Web
Project Tools in Web Development
Project Tools in Web Development
海纳百川,有容乃大
海纳百川,有容乃大
Rack
Rack
Recently uploaded
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
ranjana rawat
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Suman Mia
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
ranjana rawat
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
misbanausheenparvam
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
humanexperienceaaa
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
NikhilNagaraju
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
soniya singh
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
purnimasatapathy1234
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
Suhani Kapoor
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
GDSCAESB
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
RajkumarAkumalla
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
upamatechverse
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
slot gacor bisa pakai pulsa
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
9953056974 Low Rate Call Girls In Saket, Delhi NCR
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
ranjana rawat
Extrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
120cr0395
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
srsj9000
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
null - The Open Security Community
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
João Esperancinha
Recently uploaded
(20)
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
Extrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Wysiwig on Rails
1.
Wysiwig on Rails Roppongi.rb#1 @__timakin__
/ timakin
2.
Hello! • timakin /
@__timakin__ • Ruby / Node / Go • https://medium.com/@timakin • tech-savvy.hatenablog.com
3.
Wysiwig
4.
5.
Wysiwig • • • •
6.
Wysiwyg • • • • edit /
view
7.
Wysiwig on Rails
8.
Wysiwyg Rails • CKE
Editor • Squire • Froala Editor • Bootsy • Redactor • Medium-Editor
9.
CKE Editor
10.
CKE Editor • • WordPress •
Rails Carrierwave/PaperClip • Plugin Rails config •
11.
Squire
12.
Squire • • • textarea iframe
13.
Froala Editor
14.
Froala Editor • • • S3
( or Froala Storage ) • input
15.
Bootsy
16.
Bootsy • Rails i18n •
Squire • Carrierwave bootstrap-wysihtml5
17.
Redactor
18.
Redactor • • Video insert
(Embed tag ) / Table view / File upload •
19.
Medium-Editor
20.
Medium-Editor • Medium • • edit
21.
Wysiwyg Rails • CKE
Editor • Squire • Froala Editor • Bootsy • Redactor • Medium-Editor
22.
Wysiwyg Rails • CKE
Editor • Squire • Froala Editor • Bootsy • Redactor • Medium-Editor
23.
Wysiwyg Rails • CKE
Editor • Squire • Froala Editor • Bootsy • Redactor • Medium-Editor
24.
Dante-Editor
25.
Dante-Editor • Medium-Editor Medium •
Image upload, video, social embed / • iframe url embedly • S3 API js • div value form hidden_field • gem
26.
image upload class ApiController
< ApplicationController protect_from_forgery with: :null_session def upload_image s3 = Aws::S3::Resource.new(region: ENV['AWS_REGION'], access_key_id: ENV['AWS_ACCESS_KEY_ID'], secret_access_key: ENV['AWS_SECRET_ACCESS_KEY']) case Rails.env when 'production' obj = s3.bucket(ENV['SACKET_FOG_PRODUCTION_DIRECTORY']).object("images/embedded/ #{SecureRandom.hex(8)}") when 'staging' obj = s3.bucket(ENV['SACKET_FOG_STAGING_DIRECTORY']).object("images/embedded/#{SecureRandom.hex(8)}") when 'development' obj = s3.bucket(ENV['SACKET_FOG_STAGING_DIRECTORY']).object("images/embedded/#{SecureRandom.hex(8)}") end obj.upload_file(params[:file].tempfile, acl: 'public-read') render json: { status: :ok, data: obj.public_url } end end
27.
form editor = new
Dante.Editor( { el: "#editor", disable_title: true, upload_url: "/api/upload_image", base_widgets: ["uploader", "embed"], oembed_url: "http://api.embed.ly/1/oembed?key=hogehoge" } ); editor.start() $(document).ready(function(){ $("#editor").bind("input properchange", function(){ $("#text_" + $(this).attr("data-field-id")).val($(this).html()) }); });
28.
# var embedTemplate =
function() { return "<figure contenteditable='false' class='graf--figure graf--iframe graf--first' name='504e' tabindex='0'> <div class='iframeContainer'> <iframe frameborder='0' width='700' height='393' data-media-id='' src='' data-height='480' data-width='854'> </iframe> </div> <figcaption contenteditable='true' data-default-value='Type caption for embed (optional)' class='imageCaption'> <a rel='nofollow' class='markup--anchor markup--figure-anchor' data-href='' href='' target='_blank'> </a> </ figcaption> </figure>"; }; var oembed_url = "http://api.embed.ly/1/oembed? key=c6fc4f62de674f8a8ee60a7cbea1e13d&url=";
29.
$(function(){ var node =
$(".is-embedable"); var node_name = node.attr('name'); if (node.text()) { console.log(node.text()); return $.getJSON("" + oembed_url + (node.text())).success((function(_this) { return function(data) { var iframe_src, replaced_node, tmpl, url; var node = $("[name=" + node_name + "]"); node.hide(); iframe_src = $(data.html).prop("src"); tmpl = $(embedTemplate()); tmpl.attr("name", node.attr("name")); $(node).replaceWith(tmpl); replaced_node = $(".graf--iframe[name=" + (node.attr("name")) + "]"); replaced_node.find("iframe").attr("src", iframe_src); url = data.url || data.author_url; replaced_node.find(".markup--anchor").attr("href", url).text(url); }; })(this)).error((function(_this) { return function(res) { console.log(res); }; })(this)); } });
30.
• Dante-Editor • Rails gem Carrierwave js
Download now