Inline elements. DrupalCamp Berlin 2014

20
Inline elements with CKEditor DrupalCamp Berlin, November 2014

description

Adding inline elements is always challenging. This presentation is about way we accomplished this task in Drupal 7 with latest widgets plugins of CKEditor 4.3.x

Transcript of Inline elements. DrupalCamp Berlin 2014

Page 1: Inline elements. DrupalCamp Berlin 2014

Inline elements with CKEditor

DrupalCamp Berlin, November 2014

Page 2: Inline elements. DrupalCamp Berlin 2014

About me• Yuriy Gerasimov• Developer & Drupal Architect• @ygerasimov

Page 3: Inline elements. DrupalCamp Berlin 2014

Rich inline elements●

Page 4: Inline elements. DrupalCamp Berlin 2014

Problems● editors want to add rich elements in WYSIWYG● developers would like editors not to break the site

Page 5: Inline elements. DrupalCamp Berlin 2014

Give editors HTML example to edit?●

Page 6: Inline elements. DrupalCamp Berlin 2014

Page 7: Inline elements. DrupalCamp Berlin 2014

Page 8: Inline elements. DrupalCamp Berlin 2014

Drupal 7 solutions● Media module● Scald● Asset● Bean WYSIWYG

Page 9: Inline elements. DrupalCamp Berlin 2014

Media• file entities• embedded as tokens

Page 10: Inline elements. DrupalCamp Berlin 2014

Scald● media atoms● embedded as html

Page 11: Inline elements. DrupalCamp Berlin 2014

Asset• embedded as html• plugins

Page 12: Inline elements. DrupalCamp Berlin 2014

Bean WYSIWYG• use fieldable beans• embed tokens

[block_insert]1[/block_insert]

Page 13: Inline elements. DrupalCamp Berlin 2014

CKEditor widgets• predefined template • inline editing • draggable

Page 14: Inline elements. DrupalCamp Berlin 2014

Widget plugin drupal• drupal module with wysiwyg plugin• http://docs.ckeditor.com/#!/guide/widget_sdk_intro• https://github.com/ygerasimov/drupal_wysiwyg_widget• https://www.drupal.org/node/2367441

Page 15: Inline elements. DrupalCamp Berlin 2014

Enable plugin

Page 16: Inline elements. DrupalCamp Berlin 2014

CKEditor tutorial

Page 17: Inline elements. DrupalCamp Berlin 2014

WYSIWYG plugin

Page 18: Inline elements. DrupalCamp Berlin 2014

WYSIWYG js

Page 19: Inline elements. DrupalCamp Berlin 2014

Works!

Page 20: Inline elements. DrupalCamp Berlin 2014

Questions?