Closed Bug 797479 Opened 12 years ago Closed 12 years ago

Implement stub editor for live samples in advance of JSFiddle integration

Categories

(developer.mozilla.org Graveyard :: Editing, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: lorchard, Unassigned)

References

Details

(Whiteboard: s=2012-10-30 u=user c=Editing)

In anticipation of jsFiddle API changes to use it as an editor, build an initial primitive editor for live samples. Say, just 3 text areas and an iframe: HTML, CSS, JS, and a rendered view
For bonus points, try to make this work with a POST API that anticipates jsFiddle. That is, mock up the editor as a service to the site, even though it lives on the same site.
And some quick top-of-head notes from our jsFiddle meeting about the round-trip POST API:

* Hit Edit on a live sample, generate a temporary ID

* submit a POST form with html,css,js + temp ID to jsFiddle using this API: http://doc.jsfiddle.net/api/post.html

(example http://jsfiddle.net/zalun/sthmj/embedded/result/)

* Hit Save in jsFiddle (or the stub editor), receive a POST at some URL with html,css,js + temp ID. (eg. POST /en-US/docs/samples/{ID})

* Create a new live sample revision based on the updated html,css,js

* Show updated sample
Whiteboard: s=2012-10-30
Whiteboard: s=2012-10-30 → s=2012-10-30 p=
Whiteboard: s=2012-10-30 p= → s=2012-10-30 u=user
Priority: -- → P1
Component: Landing pages → Editing
Whiteboard: s=2012-10-30 u=user → s=2012-10-30 u=user c=Editing
Summary: Stub editor for live samples → Lay the groundwork for integration with jsFiddle
Summary: Lay the groundwork for integration with jsFiddle → Implement stub editor for live samples in advance of JSFiddle integration
This can also be an incremental opportunity for better live sample editing, assuming it takes awhile to get JSFiddle working.

As it stands now, a live sample exists as a section + code listings, and those can be edited in the CKEditor WYSIWYG. But, that might not be the friendliest way to edit a sample. 

So, a stub editor implemented for this bug could improve things a bit by allowing the code listings of a particular sample to be edited in a kind of "JSFiddle-lite" that uses the ACE editor for each section.
Have Live Samples already implemented - if we still want to go in this direction then please reopen
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.