Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Taming Content Editable with Ember.js
Search
Gavin Joyce
May 15, 2015
Technology
1
360
Taming Content Editable with Ember.js
A talk I gave to Ember London:
http://www.meetup.com/London-Emberjs-User-Group/events/221220636/
Gavin Joyce
May 15, 2015
Tweet
Share
More Decks by Gavin Joyce
See All by Gavin Joyce
Scaling Ember at Intercom - EmberCamp London
gavinjoyce
1
230
Taming large Rails apps with Mutations
gavinjoyce
2
370
Taming Content Editable with Ember.js - Ember NYC
gavinjoyce
1
100
Other Decks in Technology
See All in Technology
AIチャットボット開発への生成AI活用
ryomrt
0
170
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
120
日経電子版のStoreKit2フルリニューアル
shimastripe
1
140
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.4k
SSMRunbook作成の勘所_20241120
koichiotomo
3
160
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
950
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
690
複雑なState管理からの脱却
sansantech
PRO
1
150
Featured
See All Featured
Designing the Hi-DPI Web
ddemaree
280
34k
Building Your Own Lightsaber
phodgson
103
6.1k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Side Projects
sachag
452
42k
Happy Clients
brianwarren
98
6.7k
Music & Morning Musume
bryan
46
6.2k
What's new in Ruby 2.0
geeforr
343
31k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Adopting Sorbet at Scale
ufuk
73
9.1k
Transcript
Taming Content Editable with Ember.js @gavinjoyce
[email protected]
http://blog.intercom.io/ember-delivers-rapid-improvements-at-intercom
Creating content in Intercom (demo) simple composer, auto message wizard,
inbox, mentions, emoji, saved replies
None
embercom-composer cli addon
yeah, but why? https://speakerdeck.com/patocallaghan/contenteditable
Block Object Model (build a block editor, not a HTML
editor)
Block Selection do Stack Block List The DOM Composer component
The BOM
The BOM The DOM Editor View Event Handling DOM Selection
UI Coordinates Rendering Composer component
The BOM Composer State BOM Selection Undo Stack Blocks The
DOM Editor View Event Handling DOM Selection UI Coordinates Rendering Composer component
Composer State The BOM
Composer State Undo Stack The BOM
Composer State Block Selection Undo Stack The BOM
Composer State Block Selection Undo Stack Block List The BOM
Composer State Block Selection Undo Stack The BOM Paragraph Item
Ordered List Block List
Paragraph Composer State Block Selection Undo Stack Block List Item
Ordered List Command • Backspace • Delete • Return • Sync • Insert Attribute • Insert Character • Insert Block • Paste • ...
None
None
Blocks Paragraph text: “hello there” Entities Italic (0 -> 5)
Bold (6 -> 14) Selection: 0:0:1 → 0:0:1
Blocks Paragraph text: “hello there” Entities Italic (0 -> 5)
Bold (6 -> 14) Selection: 0:0:2 → 0:0:9
Blocks Paragraph text: “hello there” Entities Italic (0 -> 5)
Bold (9 -> 14) Selection: 0:0:2 → 0:0:9
Blocks Paragraph text: “hello there” Entities Italic (0 -> 5)
Bold (2 -> 14) Selection: 0:0:2 → 0:0:9
Syncing
Syncing UI Event
Syncing UI Event Command
Syncing UI Event Command Sync or
Syncing UI Event Command Sync Mutate BOM or
Syncing UI Event Command Sync Mutate BOM Rerender? or
Undo Stack github.com/intercom/ember-undo-stack
• Open Source • CSS Slurping • Editors • Performance
• Testing
• Open Source • CSS Slurping • Editors • Performance
• Testing
• Open Source • CSS Slurping • Editors • Performance
• Testing
• Open Source • CSS Slurping • Editors • Performance
• Testing
• Open Source • CSS Slurping • Editors • Performance
• Testing (2k+ tests)
Questions? @gavinjoyce
[email protected]