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
370
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
380
Taming Content Editable with Ember.js - Ember NYC
gavinjoyce
1
110
Other Decks in Technology
See All in Technology
ヘブンバーンズレッドのレンダリングパイプライン刷新
gree_tech
PRO
0
590
AWSを利用する上で知っておきたい名前解決のはなし(10分版)
nagisa53
8
2k
実践!カスタムインストラクション&スラッシュコマンド
puku0x
0
210
自作JSエンジンに推しプロポーザルを実装したい!
sajikix
1
160
AWSで推進するデータマネジメント
kawanago
1
1.2k
La gouvernance territoriale des données grâce à la plateforme Terreze
bluehats
0
120
「魔法少女まどか☆マギカ Magia Exedra」での負荷試験の実践と学び
gree_tech
PRO
0
620
dbt開発 with Claude Codeのためのガードレール設計
10xinc
1
630
【初心者向け】ローカルLLMの色々な動かし方まとめ
aratako
7
3.3k
生成AIでセキュリティ運用を効率化する話
sakaitakeshi
0
300
[RSJ25] Feasible RAG: Hierarchical Multimodal Retrieval with Feasibility-Aware Embodied Memory for Mobile Manipulation
keio_smilab
PRO
0
120
Codeful Serverless / 一人運用でもやり抜く力
_kensh
6
330
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Being A Developer After 40
akosma
90
590k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
840
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
How to train your dragon (web standard)
notwaldorf
96
6.2k
The Language of Interfaces
destraynor
161
25k
Speed Design
sergeychernyshev
32
1.1k
The World Runs on Bad Software
bkeepers
PRO
70
11k
Making Projects Easy
brettharned
117
6.4k
Optimizing for Happiness
mojombo
379
70k
Documentation Writing (for coders)
carmenintech
74
5k
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]