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
「海外登壇」という 選択肢を与えるために 〜Gophers EX
logica0419
0
500
君も受託系GISエンジニアにならないか
sudataka
1
370
オブザーバビリティの観点でみるAWS / AWS from observability perspective
ymotongpoo
7
1k
管理者しか知らないOutlookの裏側のAIを覗く#AzureTravelers
hirotomotaguchi
1
240
スタートアップ1人目QAエンジニアが QAチームを立ち上げ、“個”からチーム、 そして“組織”に成長するまで / How to set up QA team at reiwatravel
mii3king
1
1.1k
2.5Dモデルのすべて
yu4u
2
610
事業継続を支える自動テストの考え方
tsuemura
0
300
AndroidXR 開発ツールごとの できることできないこと
donabe3
0
110
インフラをつくるとはどういうことなのか、 あるいはPlatform Engineeringについて
nwiizo
5
2.1k
High Performance PHP
cmuench
0
140
プロセス改善による品質向上事例
tomasagi
1
1.6k
モノレポ開発のエラー、誰が見る?Datadog で実現する適切なトリアージとエスカレーション
biwashi
6
770
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
98
5.3k
Fireside Chat
paigeccino
34
3.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
8
270
Statistics for Hackers
jakevdp
797
220k
How GitHub (no longer) Works
holman
313
140k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
What's in a price? How to price your products and services
michaelherold
244
12k
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]