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
350
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
220
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
長期間TiDBを使ってきた話 @ 私たちはなぜNewSQLを使うのかTiDB選定5社が語る選定理由と活用LT / Experiences with TiDB Over Time
chibiegg
2
900
Compose Compiler Metricsを使った実践的なコードレビュー
tomorrowkey
1
220
JSON攻略法.pdf
miyakemito
8
5.1k
推しは推せるときに推せ! プロダクトにフィードバックしていこう
nakasho
0
320
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
2.1k
よく聞くけど使ったことないソフトウェアNo.1 KafkaとSnowflake
foursue
4
360
FrontDoorとWebAppsを組み合わせた際のリダイレクト処理の注意点
kenichirokimura
1
530
MySQL の SQL クエリチューニングの要所を掴む勉強会
andpad
3
6.4k
現代CSSフレームワークの内部実装とその仕組み
poteboy
7
3.6k
Python と Snowflake はズッ友だょ!~ Snowflake の Python 関連機能をふりかえる ~
__allllllllez__
1
120
GraphQL 成熟度モデルの紹介と、プロダクトに当てはめた事例 / GraphQL maturity model
mh4gf
7
1.3k
Vertex AI を中心に 生成AIのアップデートを共有します
kaz1437
0
310
Featured
See All Featured
Building Your Own Lightsaber
phodgson
99
5.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
274
13k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
19
1.7k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
6
1.5k
The Mythical Team-Month
searls
216
42k
The Straight Up "How To Draw Better" Workshop
denniskardys
227
130k
Raft: Consensus for Rubyists
vanstee
132
6.3k
Stop Working from a Prison Cell
hatefulcrawdad
266
19k
Design by the Numbers
sachag
274
18k
Fashionably flexible responsive web design (full day workshop)
malarkey
398
65k
10 Git Anti Patterns You Should be Aware of
lemiorhan
648
58k
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]