SlideShare a Scribd company logo
1 of 78
Download to read offline
CKEditor Widgets with Drupal
Engr. Ranel O. Padon	

	

Kite Systems | http://github.com/ranelpadon
About Me
•  Software Engineer at Kite Systems (Hong Kong-based company)	

–  full-time Drupal developer for CNN Travel (our client)	

•  part-time Python lecturer in University of the Philippines	

•  involved in Java and Python projects before	

•  plays competitive futsal
Topics
•  Why give importance on contents?	

•  Why use a WYSIWYG tool and CKEditor?	

•  Why use widgets?	

•  How to create widget from scratch?	

–  Grouped Texts widget	

–  HERE Maps widget	

•  CNN Travel in-house widgets 	

–  Inline Ads 	

–  Inline Maps	

–  Service Info widget	

•  My personal project: Leaflet Maps widget
Why Contents?
•  one of the best ways to drive traffic to your site
is to create valuable and interesting contents	

•  to create high-quality contents the editors must
have effective and high-quality tools
Why WYSIWYG?
•  WYSIWYG (WhatYou See Is WhatYou Get)
Editors could be used to create/edit contents
directly in your web site	

•  eliminates the need to use a word document
processor(MS Word, LibreOffice Writer)	

•  boosts editor’s productivity
Why WYSIWYG?
•  Node view	

(normal page view)
Why WYSIWYG?
•  Node Edit link
CKEditor Toolbar	

•  Node Edit view	

(CKEditor view)
Why CKEditor?
image captured from http://www.ckeditor.com
Why CKEditor?
image captured from http://www.ckeditor.com
Why CKEditor?
image captured from http://www.ckeditor.com
Why CKEditor?
image captured from http://www.ckeditor.com
Why CKEditor?
image captured from http://www.ckeditor.com
Why CKEditor?
•  Has good support for common CMSes like
Drupal, WordPress, Django, etc.	

•  Default WYSIWYG Editor in Drupal 8!
Why CKEditor?
•  Check-out xEditor 2.0 for in-place editing
of contents (Drupal module for live node
view editing):
https://www.drupal.org/project/xeditor
Why CKEditor?
•  a redesigned version of FCKeditor	

•  created by Frederico Caldeira Knabben
Why Widgets?
•  grouped CKEditor elements	

•  subclass of the Plugin class	

•  widget styling has a template	

	

- could have a generic style for all widget 	

	

- could have specific style for specific via a 	

 	

	

 custom Dialog window	

•  widget is a drag-and-drop element, but as a group	

•  widgets could have multiple instances
Why Widgets?
	

•  we use to inject spatial information in our
content using a customized Drupal’s Leaflet
module.	

•  we could display maps in Leaflet as a block
but it could be too limiting	

•  sometimes our editors write articles like
Top10 articles in Hong Kong and want to
insert the map alongside its content writeup
Widget 1: Grouped Texts
Widget 2: Code Snippets
Widget 3: Annotated Images
Widget 4: Math Formulas
CKEditor Widgets Live Demo
•  Check-out the live demo of the four widgets:	

	

http://ckeditor.com/demo#widgets
Custom Widget
•  Structure/Required Files	

–  PLUGIN_NAME/plugin.js	

–  PLUGIN_NAMEs/css/contents.css	

–  PLUGIN_NAME/icons/PLUGIN_NAME.png
Custom Widget: Grouped texts
•  Required Files	

–  grouped_texts/plugin.js	

–  grouped_texts/css/contents.css	

–  grouped_texts/icons/grouped_texts.png	

ideas for this sample widget is obtained from the Simple Box widget from here:	

	

 https://github.com/ckeditor/ckeditor-docs/tree/master/guides/widget_sdk/tutorial_1
Custom Widget: Grouped texts
Custom Widget: Grouped texts
Custom Widget: Grouped texts
–  grouped_texts/plugin.js
Custom Widget: Grouped texts
Custom Widget: Grouped texts
Custom Widget: Grouped texts
Custom Widget: Grouped texts
–  grouped_texts/css/contents.css
Custom Widget: HERE Maps
Workhorse Widget Files	

•  Plugin Core: Defines the plugin and attaches the
plugin to the CKEditor toolbar.	

•  Dialog Script: Displays the map options when
creating and editing existing maps.	

•  Map Iframe Renderer: Parses the map options via
URL and renders the map accordingly.
Custom Widget: HERE Maps
•  Widget Files	

–  here_maps/plugin.js	

–  here_maps/css/contents.css	

–  here_maps/icons/here_maps.png	

–  here_maps/dialogs/here_maps.js	

–  here_maps/scripts/here_maps_iframe.html
Custom Widget: HERE Maps
•  Creating a new HERE Maps widget
Custom Widget: HERE Maps
•  Inserting the new HERE Maps widget; loads the iframe element
Custom Widget: HERE Maps
•  Editing the HERE Maps widget (by double-clicking the handle bars that
displays in upper-left corner of the widget when you hover the mouse)
Custom Widget: HERE Maps
–  here_maps/plugin.js
Custom Widget: HERE Maps
–  here_maps/plugin.js
Custom Widget: HERE Maps
–  here_maps/dialog/here_maps.js
Custom Widget: HERE Maps
–  here_maps/dialog/here_maps.js (setup method, for editing
existing widgets)
Custom Widget: HERE Maps
–  here_maps/dialog/here_maps.js (setup and commit methods)
Custom Widget: HERE Maps
–  here_maps/dialog/here_maps.js (commit method, acts as a Submit/
Save handler)
Custom Widget: HERE Maps
–  here_maps/dialog/here_maps.js (commit method)
Custom Widget: HERE Maps
–  here_maps/scripts/here_maps_iframe.html (executes when the commit
method is called)
Custom Widget: HERE Maps
–  parse the URL 	

query parameters	

and pass them as info	

to build the map
Custom Widget: HERE Maps
–  build the map 	

using the info 	

from iframe’s URL
Custom Widget: HERE Maps
–  specify the HERE Maps credentials, could be passed as URL params
also or store them in Drupal.settings object
Custom Widget: HERE Maps
–  instantiate a new map using the specified map options via URL
(Latitude and Longitude parameters)	

–  you could include via URL other map variables like zoom level, map
center, etc
Custom Widget: Drupal Hook
the custom widgets could be registered in Drupal using
hook_ckeditor_plugins:	
  
Custom Widget: Drupal Hook
Custom Widget: Drupal Hook
Custom Widget: Drupal Hook
enable them in the activated CKEditor profile,	

usually in admin/config/content/ckeditor/edit/Advanced 	
  
Custom Widget: Drupal Hook
they must be included in the Current Toolbar as well	
  
Custom Widget: Drupal Hook
they will now appear in the CKEditor toolbar when adding/editing
articles/contents	
  
CNN Travel Ads Widget
has similar mechanism to that of HERE Maps widget (uses iframe also)	
  
CNN Travel Ads Widget
Dialog window’s options 	

for specifying ads	
  
CNN Travel Map Widget
•  maps could show one or more places	

•  maps could have various dimensions	

•  maps could have the specified alignment	

•  could show nearby TripAdvisor places	

•  popups should be styled similar to
TripAdvisor	

•  preserves the last zoom level state	

–  via mouse scroll zoom events
CNN Travel Map Widget
•  Node Edit mode
CNN Travel Map Widget
•  Node Edit mode	

•  shows the Dialog window’s Places tab options
CNN Travel Map Widget
•  Node Edit mode	

•  shows the Options tab and the auto-
complete search functionality	

•  uses Twitter’s TypeAhead API and 	

fetches live data from TripAdvisor’s servers
CNN Travel Service Info
•  CNN Travel Map widget plus other add-ons	

•  shows one Place only	

•  focuses on custom texts and TripAdvisor data	

–  user ratings/reviews	

–  booking info
CNN Travel Service Info
•  Node Edit mode (Hong Kong’s Insider Guide article)	

	

http://travel.cnn.com/destinations-insider-guide-hong-kong-954446	

http://travel.cnn.com/destinations-insider-guide-hong-kong-954446
CNN Travel Service Info
•  Node Edit mode
CNN Travel Service Info
http://travel.cnn.com/destinations-insider-guide-hong-kong-954446
CNN Travel Service Info
http://travel.cnn.com/destinations-insider-guide-hong-kong-954446	

•  the widget
showing the
TripAdvisor
reviews
CNN Travel Service Info
http://travel.cnn.com/destinations-insider-guide-hong-kong-954446	

•  the widget
showing the
HERE Maps
section
Challenges We Encountered
•  iframes are notoriosly slow, for contents with
lot of map widgets, the page takes too long to
fully load	

•  we refactored our widget implementation
and converted the map iframes to ordinary
divs, and treated the main page as the main
iframe for all the widgets
Challenges We Encountered
•  we further optimized the widget rendering by
rendering them only as needed or as the page
scrolls	

•  so if the widget is not currently visible in the
viewing area, the widget will be not rendered
yet
CKEditor leaflet Maps
Project Page: http://ckeditor.com/addon/leaflet
CKEditor leaflet Maps
Live Demo: 	

http://ranelpadon.github.io/ckeditor-leaflet/index.html
CKEditor leaflet Maps
Live Demo (Dialog window): 	

http://ranelpadon.github.io/ckeditor-leaflet/index.html
CKEditor leaflet Maps
Utilizes these libraries:	

	

•  CKEditor's Widget API	

•  Google's Places Library/Type-Ahead Search	

•  Google's Geocoding API	

•  Leaflet JS, 	

•  Leaflet - Tile Providers	

•  Leaflet - MiniMap
CKEditor leaflet Maps
•  has good code base (with ample inline code
comments) when you want to develop
custom widgets	

•  includes installation guide that could be useful
in installing CKEditor and/or plugins/widgets
in Drupal:
https://github.com/ranelpadon/ckeditor-leaflet/blob/
master/Installation%20Guide.txt
Recommendation
•  take time to read the much improved and
comprehensive documentation (includes
useful links to related resources) and
familiarize yourself to the valuable APIs:	

–  http://sdk.ckeditor.com
Recommendation | CKEditor sdk
Special Thanks
•  CNN Travel (http://travel.cnn.com) for
allowing me to share what we are working on.	

	

•  HERE (http://here.com) for sponsoring my talk.
What did you think about the presentation ?	

	

	

Leave your feedback and 	

help us improve Drupalcamp on :	

http://2014.drupalcebu.org/

More Related Content

What's hot

Gephi Plugin Developer Workshop
Gephi Plugin Developer WorkshopGephi Plugin Developer Workshop
Gephi Plugin Developer WorkshopGephi Consortium
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design Patternguy_davis
 
The Larch - a visual interactive programming environment
The Larch - a visual interactive programming environmentThe Larch - a visual interactive programming environment
The Larch - a visual interactive programming environmentPython Ireland
 
The New Way of Developing with AEM 6.0 | Sightly | Beautiful Markup
The New Way of Developing with AEM 6.0 | Sightly | Beautiful MarkupThe New Way of Developing with AEM 6.0 | Sightly | Beautiful Markup
The New Way of Developing with AEM 6.0 | Sightly | Beautiful MarkupSenol Tas
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and SlingLo Ki
 
ML Infra for Netflix Recommendations - AI NEXTCon talk
ML Infra for Netflix Recommendations - AI NEXTCon talkML Infra for Netflix Recommendations - AI NEXTCon talk
ML Infra for Netflix Recommendations - AI NEXTCon talkFaisal Siddiqi
 

What's hot (7)

Widget Tutorial
Widget TutorialWidget Tutorial
Widget Tutorial
 
Gephi Plugin Developer Workshop
Gephi Plugin Developer WorkshopGephi Plugin Developer Workshop
Gephi Plugin Developer Workshop
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design Pattern
 
The Larch - a visual interactive programming environment
The Larch - a visual interactive programming environmentThe Larch - a visual interactive programming environment
The Larch - a visual interactive programming environment
 
The New Way of Developing with AEM 6.0 | Sightly | Beautiful Markup
The New Way of Developing with AEM 6.0 | Sightly | Beautiful MarkupThe New Way of Developing with AEM 6.0 | Sightly | Beautiful Markup
The New Way of Developing with AEM 6.0 | Sightly | Beautiful Markup
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and Sling
 
ML Infra for Netflix Recommendations - AI NEXTCon talk
ML Infra for Netflix Recommendations - AI NEXTCon talkML Infra for Netflix Recommendations - AI NEXTCon talk
ML Infra for Netflix Recommendations - AI NEXTCon talk
 

Viewers also liked

LVEE 2014: Text parsing with Python and PLY
LVEE 2014: Text parsing with Python and PLYLVEE 2014: Text parsing with Python and PLY
LVEE 2014: Text parsing with Python and PLYdmbaturin
 
PyCon PH 2014 - GeoComputation
PyCon PH 2014 - GeoComputationPyCon PH 2014 - GeoComputation
PyCon PH 2014 - GeoComputationRanel Padon
 
WAD : A Module for Converting Fatal Extension Errors into Python Exceptions
WAD : A Module for Converting Fatal Extension Errors into Python ExceptionsWAD : A Module for Converting Fatal Extension Errors into Python Exceptions
WAD : A Module for Converting Fatal Extension Errors into Python ExceptionsDavid Beazley (Dabeaz LLC)
 
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...David Beazley (Dabeaz LLC)
 
Generator Tricks for Systems Programmers, v2.0
Generator Tricks for Systems Programmers, v2.0Generator Tricks for Systems Programmers, v2.0
Generator Tricks for Systems Programmers, v2.0David Beazley (Dabeaz LLC)
 
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...David Beazley (Dabeaz LLC)
 
SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++
SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++
SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++David Beazley (Dabeaz LLC)
 
Python Programming - X. Exception Handling and Assertions
Python Programming - X. Exception Handling and AssertionsPython Programming - X. Exception Handling and Assertions
Python Programming - X. Exception Handling and AssertionsRanel Padon
 
Python for text processing
Python for text processingPython for text processing
Python for text processingXiang Li
 
Python Programming - III. Controlling the Flow
Python Programming - III. Controlling the FlowPython Programming - III. Controlling the Flow
Python Programming - III. Controlling the FlowRanel Padon
 
Python Programming - VII. Customizing Classes and Operator Overloading
Python Programming - VII. Customizing Classes and Operator OverloadingPython Programming - VII. Customizing Classes and Operator Overloading
Python Programming - VII. Customizing Classes and Operator OverloadingRanel Padon
 
Python Programming - IX. On Randomness
Python Programming - IX. On RandomnessPython Programming - IX. On Randomness
Python Programming - IX. On RandomnessRanel Padon
 
Switchable Map APIs with Drupal
Switchable Map APIs with DrupalSwitchable Map APIs with Drupal
Switchable Map APIs with DrupalRanel Padon
 
Python Programming - I. Introduction
Python Programming - I. IntroductionPython Programming - I. Introduction
Python Programming - I. IntroductionRanel Padon
 

Viewers also liked (20)

Responsive web-design
Responsive web-designResponsive web-design
Responsive web-design
 
INCF 2013 - Uniform Resource Layer
INCF 2013 - Uniform Resource LayerINCF 2013 - Uniform Resource Layer
INCF 2013 - Uniform Resource Layer
 
LVEE 2014: Text parsing with Python and PLY
LVEE 2014: Text parsing with Python and PLYLVEE 2014: Text parsing with Python and PLY
LVEE 2014: Text parsing with Python and PLY
 
Text analysis using python
Text analysis using pythonText analysis using python
Text analysis using python
 
PyCon PH 2014 - GeoComputation
PyCon PH 2014 - GeoComputationPyCon PH 2014 - GeoComputation
PyCon PH 2014 - GeoComputation
 
WAD : A Module for Converting Fatal Extension Errors into Python Exceptions
WAD : A Module for Converting Fatal Extension Errors into Python ExceptionsWAD : A Module for Converting Fatal Extension Errors into Python Exceptions
WAD : A Module for Converting Fatal Extension Errors into Python Exceptions
 
Generator Tricks for Systems Programmers
Generator Tricks for Systems ProgrammersGenerator Tricks for Systems Programmers
Generator Tricks for Systems Programmers
 
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...
 
Understanding the Python GIL
Understanding the Python GILUnderstanding the Python GIL
Understanding the Python GIL
 
Generator Tricks for Systems Programmers, v2.0
Generator Tricks for Systems Programmers, v2.0Generator Tricks for Systems Programmers, v2.0
Generator Tricks for Systems Programmers, v2.0
 
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...
 
SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++
SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++
SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++
 
Python introduction
Python introductionPython introduction
Python introduction
 
Python Programming - X. Exception Handling and Assertions
Python Programming - X. Exception Handling and AssertionsPython Programming - X. Exception Handling and Assertions
Python Programming - X. Exception Handling and Assertions
 
Python for text processing
Python for text processingPython for text processing
Python for text processing
 
Python Programming - III. Controlling the Flow
Python Programming - III. Controlling the FlowPython Programming - III. Controlling the Flow
Python Programming - III. Controlling the Flow
 
Python Programming - VII. Customizing Classes and Operator Overloading
Python Programming - VII. Customizing Classes and Operator OverloadingPython Programming - VII. Customizing Classes and Operator Overloading
Python Programming - VII. Customizing Classes and Operator Overloading
 
Python Programming - IX. On Randomness
Python Programming - IX. On RandomnessPython Programming - IX. On Randomness
Python Programming - IX. On Randomness
 
Switchable Map APIs with Drupal
Switchable Map APIs with DrupalSwitchable Map APIs with Drupal
Switchable Map APIs with Drupal
 
Python Programming - I. Introduction
Python Programming - I. IntroductionPython Programming - I. Introduction
Python Programming - I. Introduction
 

Similar to CKEditor Widgets with Drupal

Syncfusion Dashboard Platform SDK
Syncfusion Dashboard  Platform SDKSyncfusion Dashboard  Platform SDK
Syncfusion Dashboard Platform SDKDavis Jebaraj
 
European Collaboration Summit - SharePoint Framework Angular & Azure Functions
European Collaboration Summit - SharePoint Framework Angular & Azure FunctionsEuropean Collaboration Summit - SharePoint Framework Angular & Azure Functions
European Collaboration Summit - SharePoint Framework Angular & Azure FunctionsSébastien Levert
 
Easily Create Maps in Drupal with Leaflet
Easily Create Maps in Drupal with LeafletEasily Create Maps in Drupal with Leaflet
Easily Create Maps in Drupal with LeafletAmber Matz
 
Easily Create Maps in Drupal with Leaflet
Easily Create Maps in Drupal with LeafletEasily Create Maps in Drupal with Leaflet
Easily Create Maps in Drupal with LeafletAmber Matz
 
Go for building cross-platform graphical apps
Go for building cross-platform graphical appsGo for building cross-platform graphical apps
Go for building cross-platform graphical appsAndrew Williams
 
BlackBerry Basic
BlackBerry BasicBlackBerry Basic
BlackBerry BasicDuy Do Phan
 
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...DevClub_lv
 
Contentful with Netgen Layouts workshop
Contentful with Netgen Layouts workshopContentful with Netgen Layouts workshop
Contentful with Netgen Layouts workshopIvo Lukac
 
Deep dive into share point framework webparts
Deep dive into share point framework webpartsDeep dive into share point framework webparts
Deep dive into share point framework webpartsPrabhu Nehru
 
Microsoft Power Page for Developer - ภาษาไทย
Microsoft Power Page for Developer - ภาษาไทยMicrosoft Power Page for Developer - ภาษาไทย
Microsoft Power Page for Developer - ภาษาไทยTeerasej Jiraphatchandej
 
Visio services in sharepoint 2013
Visio services in sharepoint 2013Visio services in sharepoint 2013
Visio services in sharepoint 2013BIWUG
 
Major project 2013 14
Major project 2013 14Major project 2013 14
Major project 2013 14Parag Garg
 
Flex en silverlight viewer configuratie, Esri, Mark Jagt, Boudewijn Boogaard
Flex en silverlight viewer configuratie, Esri, Mark Jagt, Boudewijn BoogaardFlex en silverlight viewer configuratie, Esri, Mark Jagt, Boudewijn Boogaard
Flex en silverlight viewer configuratie, Esri, Mark Jagt, Boudewijn BoogaardEsri Nederland
 
CUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareCUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareAlfresco Software
 
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...Lucas Jellema
 
Migrating a large scale banking app to compose
Migrating a large scale banking app to composeMigrating a large scale banking app to compose
Migrating a large scale banking app to composeFatih Giris
 

Similar to CKEditor Widgets with Drupal (20)

Syncfusion Dashboard Platform SDK
Syncfusion Dashboard  Platform SDKSyncfusion Dashboard  Platform SDK
Syncfusion Dashboard Platform SDK
 
European Collaboration Summit - SharePoint Framework Angular & Azure Functions
European Collaboration Summit - SharePoint Framework Angular & Azure FunctionsEuropean Collaboration Summit - SharePoint Framework Angular & Azure Functions
European Collaboration Summit - SharePoint Framework Angular & Azure Functions
 
Easily Create Maps in Drupal with Leaflet
Easily Create Maps in Drupal with LeafletEasily Create Maps in Drupal with Leaflet
Easily Create Maps in Drupal with Leaflet
 
Easily Create Maps in Drupal with Leaflet
Easily Create Maps in Drupal with LeafletEasily Create Maps in Drupal with Leaflet
Easily Create Maps in Drupal with Leaflet
 
Go for building cross-platform graphical apps
Go for building cross-platform graphical appsGo for building cross-platform graphical apps
Go for building cross-platform graphical apps
 
BlackBerry Basic
BlackBerry BasicBlackBerry Basic
BlackBerry Basic
 
##dd12 sviluppo mobile XPages
##dd12 sviluppo mobile XPages##dd12 sviluppo mobile XPages
##dd12 sviluppo mobile XPages
 
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
 
Diving Into Xamarin.Forms
Diving Into Xamarin.Forms Diving Into Xamarin.Forms
Diving Into Xamarin.Forms
 
Contentful with Netgen Layouts workshop
Contentful with Netgen Layouts workshopContentful with Netgen Layouts workshop
Contentful with Netgen Layouts workshop
 
Deep dive into share point framework webparts
Deep dive into share point framework webpartsDeep dive into share point framework webparts
Deep dive into share point framework webparts
 
Microsoft Power Page for Developer - ภาษาไทย
Microsoft Power Page for Developer - ภาษาไทยMicrosoft Power Page for Developer - ภาษาไทย
Microsoft Power Page for Developer - ภาษาไทย
 
Visio services in sharepoint 2013
Visio services in sharepoint 2013Visio services in sharepoint 2013
Visio services in sharepoint 2013
 
Major project 2013 14
Major project 2013 14Major project 2013 14
Major project 2013 14
 
Micro frontend
Micro frontendMicro frontend
Micro frontend
 
Flex en silverlight viewer configuratie, Esri, Mark Jagt, Boudewijn Boogaard
Flex en silverlight viewer configuratie, Esri, Mark Jagt, Boudewijn BoogaardFlex en silverlight viewer configuratie, Esri, Mark Jagt, Boudewijn Boogaard
Flex en silverlight viewer configuratie, Esri, Mark Jagt, Boudewijn Boogaard
 
CUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareCUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in Share
 
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
 
Angular or React
Angular or ReactAngular or React
Angular or React
 
Migrating a large scale banking app to compose
Migrating a large scale banking app to composeMigrating a large scale banking app to compose
Migrating a large scale banking app to compose
 

More from Ranel Padon

Python Programming - XIII. GUI Programming
Python Programming - XIII. GUI ProgrammingPython Programming - XIII. GUI Programming
Python Programming - XIII. GUI ProgrammingRanel Padon
 
Python Programming - XII. File Processing
Python Programming - XII. File ProcessingPython Programming - XII. File Processing
Python Programming - XII. File ProcessingRanel Padon
 
Python Programming - XI. String Manipulation and Regular Expressions
Python Programming - XI. String Manipulation and Regular ExpressionsPython Programming - XI. String Manipulation and Regular Expressions
Python Programming - XI. String Manipulation and Regular ExpressionsRanel Padon
 
Python Programming - VIII. Inheritance and Polymorphism
Python Programming - VIII. Inheritance and PolymorphismPython Programming - VIII. Inheritance and Polymorphism
Python Programming - VIII. Inheritance and PolymorphismRanel Padon
 
Python Programming - VI. Classes and Objects
Python Programming - VI. Classes and ObjectsPython Programming - VI. Classes and Objects
Python Programming - VI. Classes and ObjectsRanel Padon
 
Python Programming - V. Sequences (List and Tuples) and Dictionaries
Python Programming - V. Sequences (List and Tuples) and DictionariesPython Programming - V. Sequences (List and Tuples) and Dictionaries
Python Programming - V. Sequences (List and Tuples) and DictionariesRanel Padon
 
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...Ranel Padon
 
Python Programming - II. The Basics
Python Programming - II. The BasicsPython Programming - II. The Basics
Python Programming - II. The BasicsRanel Padon
 
Of Nodes and Maps (Web Mapping with Drupal - Part II)
Of Nodes and Maps (Web Mapping with Drupal - Part II)Of Nodes and Maps (Web Mapping with Drupal - Part II)
Of Nodes and Maps (Web Mapping with Drupal - Part II)Ranel Padon
 
Web Mapping with Drupal
Web Mapping with DrupalWeb Mapping with Drupal
Web Mapping with DrupalRanel Padon
 

More from Ranel Padon (10)

Python Programming - XIII. GUI Programming
Python Programming - XIII. GUI ProgrammingPython Programming - XIII. GUI Programming
Python Programming - XIII. GUI Programming
 
Python Programming - XII. File Processing
Python Programming - XII. File ProcessingPython Programming - XII. File Processing
Python Programming - XII. File Processing
 
Python Programming - XI. String Manipulation and Regular Expressions
Python Programming - XI. String Manipulation and Regular ExpressionsPython Programming - XI. String Manipulation and Regular Expressions
Python Programming - XI. String Manipulation and Regular Expressions
 
Python Programming - VIII. Inheritance and Polymorphism
Python Programming - VIII. Inheritance and PolymorphismPython Programming - VIII. Inheritance and Polymorphism
Python Programming - VIII. Inheritance and Polymorphism
 
Python Programming - VI. Classes and Objects
Python Programming - VI. Classes and ObjectsPython Programming - VI. Classes and Objects
Python Programming - VI. Classes and Objects
 
Python Programming - V. Sequences (List and Tuples) and Dictionaries
Python Programming - V. Sequences (List and Tuples) and DictionariesPython Programming - V. Sequences (List and Tuples) and Dictionaries
Python Programming - V. Sequences (List and Tuples) and Dictionaries
 
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...
 
Python Programming - II. The Basics
Python Programming - II. The BasicsPython Programming - II. The Basics
Python Programming - II. The Basics
 
Of Nodes and Maps (Web Mapping with Drupal - Part II)
Of Nodes and Maps (Web Mapping with Drupal - Part II)Of Nodes and Maps (Web Mapping with Drupal - Part II)
Of Nodes and Maps (Web Mapping with Drupal - Part II)
 
Web Mapping with Drupal
Web Mapping with DrupalWeb Mapping with Drupal
Web Mapping with Drupal
 

Recently uploaded

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Recently uploaded (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

CKEditor Widgets with Drupal

  • 1. CKEditor Widgets with Drupal Engr. Ranel O. Padon Kite Systems | http://github.com/ranelpadon
  • 2. About Me •  Software Engineer at Kite Systems (Hong Kong-based company) –  full-time Drupal developer for CNN Travel (our client) •  part-time Python lecturer in University of the Philippines •  involved in Java and Python projects before •  plays competitive futsal
  • 3. Topics •  Why give importance on contents? •  Why use a WYSIWYG tool and CKEditor? •  Why use widgets? •  How to create widget from scratch? –  Grouped Texts widget –  HERE Maps widget •  CNN Travel in-house widgets –  Inline Ads –  Inline Maps –  Service Info widget •  My personal project: Leaflet Maps widget
  • 4. Why Contents? •  one of the best ways to drive traffic to your site is to create valuable and interesting contents •  to create high-quality contents the editors must have effective and high-quality tools
  • 5. Why WYSIWYG? •  WYSIWYG (WhatYou See Is WhatYou Get) Editors could be used to create/edit contents directly in your web site •  eliminates the need to use a word document processor(MS Word, LibreOffice Writer) •  boosts editor’s productivity
  • 6. Why WYSIWYG? •  Node view (normal page view)
  • 8. CKEditor Toolbar •  Node Edit view (CKEditor view)
  • 9. Why CKEditor? image captured from http://www.ckeditor.com
  • 10. Why CKEditor? image captured from http://www.ckeditor.com
  • 11. Why CKEditor? image captured from http://www.ckeditor.com
  • 12. Why CKEditor? image captured from http://www.ckeditor.com
  • 13. Why CKEditor? image captured from http://www.ckeditor.com
  • 14. Why CKEditor? •  Has good support for common CMSes like Drupal, WordPress, Django, etc. •  Default WYSIWYG Editor in Drupal 8!
  • 15. Why CKEditor? •  Check-out xEditor 2.0 for in-place editing of contents (Drupal module for live node view editing): https://www.drupal.org/project/xeditor
  • 16. Why CKEditor? •  a redesigned version of FCKeditor •  created by Frederico Caldeira Knabben
  • 17. Why Widgets? •  grouped CKEditor elements •  subclass of the Plugin class •  widget styling has a template - could have a generic style for all widget - could have specific style for specific via a custom Dialog window •  widget is a drag-and-drop element, but as a group •  widgets could have multiple instances
  • 18. Why Widgets? •  we use to inject spatial information in our content using a customized Drupal’s Leaflet module. •  we could display maps in Leaflet as a block but it could be too limiting •  sometimes our editors write articles like Top10 articles in Hong Kong and want to insert the map alongside its content writeup
  • 20. Widget 2: Code Snippets
  • 22. Widget 4: Math Formulas
  • 23. CKEditor Widgets Live Demo •  Check-out the live demo of the four widgets: http://ckeditor.com/demo#widgets
  • 24. Custom Widget •  Structure/Required Files –  PLUGIN_NAME/plugin.js –  PLUGIN_NAMEs/css/contents.css –  PLUGIN_NAME/icons/PLUGIN_NAME.png
  • 25. Custom Widget: Grouped texts •  Required Files –  grouped_texts/plugin.js –  grouped_texts/css/contents.css –  grouped_texts/icons/grouped_texts.png ideas for this sample widget is obtained from the Simple Box widget from here: https://github.com/ckeditor/ckeditor-docs/tree/master/guides/widget_sdk/tutorial_1
  • 28. Custom Widget: Grouped texts –  grouped_texts/plugin.js
  • 32. Custom Widget: Grouped texts –  grouped_texts/css/contents.css
  • 33. Custom Widget: HERE Maps Workhorse Widget Files •  Plugin Core: Defines the plugin and attaches the plugin to the CKEditor toolbar. •  Dialog Script: Displays the map options when creating and editing existing maps. •  Map Iframe Renderer: Parses the map options via URL and renders the map accordingly.
  • 34. Custom Widget: HERE Maps •  Widget Files –  here_maps/plugin.js –  here_maps/css/contents.css –  here_maps/icons/here_maps.png –  here_maps/dialogs/here_maps.js –  here_maps/scripts/here_maps_iframe.html
  • 35. Custom Widget: HERE Maps •  Creating a new HERE Maps widget
  • 36. Custom Widget: HERE Maps •  Inserting the new HERE Maps widget; loads the iframe element
  • 37. Custom Widget: HERE Maps •  Editing the HERE Maps widget (by double-clicking the handle bars that displays in upper-left corner of the widget when you hover the mouse)
  • 38. Custom Widget: HERE Maps –  here_maps/plugin.js
  • 39. Custom Widget: HERE Maps –  here_maps/plugin.js
  • 40. Custom Widget: HERE Maps –  here_maps/dialog/here_maps.js
  • 41. Custom Widget: HERE Maps –  here_maps/dialog/here_maps.js (setup method, for editing existing widgets)
  • 42. Custom Widget: HERE Maps –  here_maps/dialog/here_maps.js (setup and commit methods)
  • 43. Custom Widget: HERE Maps –  here_maps/dialog/here_maps.js (commit method, acts as a Submit/ Save handler)
  • 44. Custom Widget: HERE Maps –  here_maps/dialog/here_maps.js (commit method)
  • 45. Custom Widget: HERE Maps –  here_maps/scripts/here_maps_iframe.html (executes when the commit method is called)
  • 46. Custom Widget: HERE Maps –  parse the URL query parameters and pass them as info to build the map
  • 47. Custom Widget: HERE Maps –  build the map using the info from iframe’s URL
  • 48. Custom Widget: HERE Maps –  specify the HERE Maps credentials, could be passed as URL params also or store them in Drupal.settings object
  • 49. Custom Widget: HERE Maps –  instantiate a new map using the specified map options via URL (Latitude and Longitude parameters) –  you could include via URL other map variables like zoom level, map center, etc
  • 50. Custom Widget: Drupal Hook the custom widgets could be registered in Drupal using hook_ckeditor_plugins:  
  • 53. Custom Widget: Drupal Hook enable them in the activated CKEditor profile, usually in admin/config/content/ckeditor/edit/Advanced  
  • 54. Custom Widget: Drupal Hook they must be included in the Current Toolbar as well  
  • 55. Custom Widget: Drupal Hook they will now appear in the CKEditor toolbar when adding/editing articles/contents  
  • 56. CNN Travel Ads Widget has similar mechanism to that of HERE Maps widget (uses iframe also)  
  • 57. CNN Travel Ads Widget Dialog window’s options for specifying ads  
  • 58. CNN Travel Map Widget •  maps could show one or more places •  maps could have various dimensions •  maps could have the specified alignment •  could show nearby TripAdvisor places •  popups should be styled similar to TripAdvisor •  preserves the last zoom level state –  via mouse scroll zoom events
  • 59. CNN Travel Map Widget •  Node Edit mode
  • 60. CNN Travel Map Widget •  Node Edit mode •  shows the Dialog window’s Places tab options
  • 61. CNN Travel Map Widget •  Node Edit mode •  shows the Options tab and the auto- complete search functionality •  uses Twitter’s TypeAhead API and fetches live data from TripAdvisor’s servers
  • 62. CNN Travel Service Info •  CNN Travel Map widget plus other add-ons •  shows one Place only •  focuses on custom texts and TripAdvisor data –  user ratings/reviews –  booking info
  • 63. CNN Travel Service Info •  Node Edit mode (Hong Kong’s Insider Guide article) http://travel.cnn.com/destinations-insider-guide-hong-kong-954446 http://travel.cnn.com/destinations-insider-guide-hong-kong-954446
  • 64. CNN Travel Service Info •  Node Edit mode
  • 65. CNN Travel Service Info http://travel.cnn.com/destinations-insider-guide-hong-kong-954446
  • 66. CNN Travel Service Info http://travel.cnn.com/destinations-insider-guide-hong-kong-954446 •  the widget showing the TripAdvisor reviews
  • 67. CNN Travel Service Info http://travel.cnn.com/destinations-insider-guide-hong-kong-954446 •  the widget showing the HERE Maps section
  • 68. Challenges We Encountered •  iframes are notoriosly slow, for contents with lot of map widgets, the page takes too long to fully load •  we refactored our widget implementation and converted the map iframes to ordinary divs, and treated the main page as the main iframe for all the widgets
  • 69. Challenges We Encountered •  we further optimized the widget rendering by rendering them only as needed or as the page scrolls •  so if the widget is not currently visible in the viewing area, the widget will be not rendered yet
  • 70. CKEditor leaflet Maps Project Page: http://ckeditor.com/addon/leaflet
  • 71. CKEditor leaflet Maps Live Demo: http://ranelpadon.github.io/ckeditor-leaflet/index.html
  • 72. CKEditor leaflet Maps Live Demo (Dialog window): http://ranelpadon.github.io/ckeditor-leaflet/index.html
  • 73. CKEditor leaflet Maps Utilizes these libraries: •  CKEditor's Widget API •  Google's Places Library/Type-Ahead Search •  Google's Geocoding API •  Leaflet JS, •  Leaflet - Tile Providers •  Leaflet - MiniMap
  • 74. CKEditor leaflet Maps •  has good code base (with ample inline code comments) when you want to develop custom widgets •  includes installation guide that could be useful in installing CKEditor and/or plugins/widgets in Drupal: https://github.com/ranelpadon/ckeditor-leaflet/blob/ master/Installation%20Guide.txt
  • 75. Recommendation •  take time to read the much improved and comprehensive documentation (includes useful links to related resources) and familiarize yourself to the valuable APIs: –  http://sdk.ckeditor.com
  • 77. Special Thanks •  CNN Travel (http://travel.cnn.com) for allowing me to share what we are working on. •  HERE (http://here.com) for sponsoring my talk.
  • 78. What did you think about the presentation ? Leave your feedback and help us improve Drupalcamp on : http://2014.drupalcebu.org/