# Help us test the rewritten Composer

**URL:** https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679
**Category:** Feature
**Tags:** feedback
**Created:** [2015年十月19日 16:51 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679 "2015-10-19T16:51:38Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [2015年十月19日 16:51 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/1 "2015-10-19T16:51:39Z")

</div>

We’ve been using [pagedown](https://code.google.com/p/pagedown/) as our rich composer for years. Unfortunately, we’d outgrown it in a few ways:

- It’s very hard to extend to add features.

- It hasn’t been updated in years.

- It had implementations of features we didn’t like or found buggy like undo/redo. We forked the editor and removed them but that just left us with a lot of dead code.

- It had zero tests. Modifying it meant we could be taking a detour to regression town U.S.A.

We made the decision to rewrite our composer using Ember.js so it was more in line with the rest of our codebase and so that we could allow people to extend it more easily.

In our master branch, we have the first attempt at this re-write and we’d love your help to test it out. We’ve deployed it to Discourse Meta already, however **it has not replaced the main posting composer yet**. This is a major code change and we want to make sure it works well before replacing the main functionality of Discourse. Instead we’ve replaced the rich markdown editor _everywhere except posting_:

1. The user preferences page, for editing your About Me

2. The admin page for editing text content

3. Editing queued posts before approving them

4. Editing category templates

If you have admin access on your own Discourse on the master branch you can test #2-4 but if you’re just trying here on Meta, the best place is #1.

Please post any issues or feedback on the new composer. If we find it works well we’ll replace the main composer shortly.

### Fun Developer Stats

- The new editor has 118 integration tests, covering _all_ of its functionality.

- The new editor is less than 350 lines of code (including the handlebars markup). Pagedown is over 2,300 lines! We’re going to be deleting _a lot_ of code.

---

<div class="post-metadata">

### Author: ![anon20391312](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@anon20391312](https://meta.discourse.org/u/anon20391312)
#### Post date: [2015年十月19日 17:32 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/4 "2015-10-19T17:32:46Z")

</div>

No shortcut keys? 😮

Apart from that… looks okay I guess. Can I also copy/paste images into it?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [2015年十月19日 17:34 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/5 "2015-10-19T17:34:11Z")

</div>

I’ll definitely add the shortcut keys back, that was a mistake 😄

Pasting images will work when it’s for posts/topics, but the other composers don’t support that.

---

<div class="post-metadata">

### Author: ![anon20391312](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@anon20391312](https://meta.discourse.org/u/anon20391312)
#### Post date: [2015年十月19日 17:39 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/6 "2015-10-19T17:39:48Z")

</div>

> [@eviltrout](#):
>
> I’ll definitely add the shortcut keys back, that was a mistake 😄

Glad to hear it 🙂

> [@](#):
>
> Pasting images will work when it’s for posts/topics, but the other composers don’t support that.

Ah cool.

What about extensibility, can I easily add in new buttons?

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [2015年十月19日 18:03 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/7 "2015-10-19T18:03:19Z")

</div>

Ok, here’s some feedback:

- The quote button should insert some example text, when nothing was selected. Yes, I know the current editor doesn’t do it either, but it should. All the other buttons do.
- The buttons that insert list items should select only the “List item” text, not the bullet point or number.
- The emoji popup looks blurry.  
 ![](https://global.discourse-cdn.com/meta/original/3X/7/d/7d187cca346820cebcd7e86a67d1c65b99f8f41e.png)

Other than that it works great.

---

<div class="post-metadata">

### Author: ![purldator](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@purldator](https://meta.discourse.org/u/purldator)
#### Post date: [2015年十月19日 19:27 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/8 "2015-10-19T19:27:01Z")

</div>

> [@gerhard](#):
>
> The quote button should insert some example text, when nothing was selected. Yes, I know the current editor doesn’t do it either, but it should. All the other buttons do.

~~It doesn’t work at all from what I am experiencing in testing it out via the user CP here at Meta. I clicked it, expecting a `>` to pop up. Outputs nothing.~~

Or, maybe that is intended? Tried it here in the composer drawer and it does the same behavior. Ehh. Disregard this if I’m not using it correctly.

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [2015年十月19日 19:31 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/9 "2015-10-19T19:31:21Z")

</div>

Currently you need to select some text for it to work. It’s the only button that doesn’t insert an example text. As you’ve already noticed the “old” editor doesn’t do it either, but it would be great if it would.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015年十月19日 19:57 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/10 "2015-10-19T19:57:34Z")

</div>

I remember people used to complain a lot about the behavior of the bulleted and numbered list buttons – the expectation was that selecting 3 lines, and pressing the list button, would turn the selection into a 3 item list. Which seems reasonable.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [2015年十月20日 02:55 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/12 "2015-10-20T02:55:13Z")

</div>

This looks like terrific progress - congrats!

I notice when I click on anything in the menu (bold or italics, for example) in the editor, the cursor jumps to the bottom, no matter where the cursor was or what text is selected when I do so. Otherwise it’s looking pretty good to me!

Will the new editor be very different from the old one? Will there be a need to (re)educate community members?

---

<div class="post-metadata">

### Author: ![dandv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dandv/32/169779_2.png) [@dandv](https://meta.discourse.org/u/dandv)
#### Post date: [2015年十月20日 03:13 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/13 "2015-10-20T03:13:44Z")

</div>

> [@eviltrout](#):
>
> [pagedown] hasn’t been updated in years.

The [StackEdit](https://github.com/benweet/stackedit) fork is quite popular (6,000+ GitHub stars).

In terms of features, would love to see `=text=` do `<kbd>text</kbd>`, a common but awkward to type bit of Markdown.

Otherwise, I hope the side-by-side sync works as well as before (or as well as in StackEdit).

---

<div class="post-metadata">

### Author: ![purldator](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@purldator](https://meta.discourse.org/u/purldator)
#### Post date: [2015年十月20日 04:02 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/14 "2015-10-20T04:02:07Z")

</div>

I mentioned StackEdit [elsewhere on Meta](https://meta.discourse.org/t/who-would-prefer-a-standard-wysiwyg-to-markdown/31340/21) but I didn’t know it could be a possible candidate to help Discourse’s own composer. Well, at least with minimal work to make it a drop-in solution.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015年十月20日 04:07 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/15 "2015-10-20T04:07:01Z")

</div>

> [@dandv](#):
>
> In terms of features, would love to see =text= do \<kbd\>text\</kbd\>, a common but awkward to type bit of Markdown.

This change is unrelated to the Markdown engine, we plan to move that to [GitHub - markdown-it/markdown-it: Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed · GitHub](https://github.com/markdown-it/markdown-it)

---

<div class="post-metadata">

### Author: ![anon20391312](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@anon20391312](https://meta.discourse.org/u/anon20391312)
#### Post date: [2015年十月20日 10:51 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/16 "2015-10-20T10:51:00Z")

</div>

I see what you mean - the emoji popup is indeed blurry. That is not related to the new editor specifically, also in the old composer the popup is now blurry.

It looks like the blurryness is caused by the `transform` CSS statement which is now used to position the element. In previous versions this was achieved by using a negative `top` and `left` for the popup positioning.

---

<div class="post-metadata">

### Author: ![dandv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dandv/32/169779_2.png) [@dandv](https://meta.discourse.org/u/dandv)
#### Post date: [2015年十月21日 01:15 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/17 "2015-10-21T01:15:02Z")

</div>

> [@eviltrout](#):
>
> I’ll definitely add the shortcut keys back

Would be great to preserve browser conventions, and ideally have shortcut keys that replicate those of very popular apps such as Gmail, Google Docs or MS Word. I’m referring in particular to:

- Ctrl+L - I expect it to go to the browser’s address bar, but Discourse hijacks it to insert a link
- Ctrl+K - I expect it to insert a link (as it does in Gmail, Google Docs and Word), but Discourse made it add backticks to the selected text (something I personally always do before and after typing that piece of code).

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015年十月21日 02:20 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/18 "2015-10-21T02:20:56Z")

</div>

We should definitely normalize on keyboard shortcuts as seen in other popular web apps.

---

<div class="post-metadata">

### Author: ![peternlewis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/peternlewis/32/108888_2.png) [@peternlewis](https://meta.discourse.org/u/peternlewis)
#### Post date: [2015年十月21日 03:07 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/19 "2015-10-21T03:07:40Z")

</div>

> [@eviltrout](#):
>
> Pasting images will work when it’s for posts/topics, but the other composers don’t support that.

Can you temporarily allow images in the “About Me” editor? I would very much like to test and ensure that image insertion works properly in Safari (and ideally pasting images, but I’m not sure that is expected to work in Safari).

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [2015年十月21日 04:58 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/20 "2015-10-21T04:58:03Z")

</div>

> [@peternlewis](#):
>
> image insertion works properly

I have a feeling that when it comes to About me, getting an image to insert properly will be easier than getting it to display properly.

Maybe crop / size down and disable background image would work?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [2015年十月21日 14:39 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/21 "2015-10-21T14:39:21Z")

</div>

It’s not easy. The image uploading widget counts on the images being in a post in a topic. It’s probably easier to wait and test that functionality when the composer is replaced.

---

<div class="post-metadata">

### Author: ![Erik\_Manger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erik_manger/32/179399_2.png) [@Erik\_Manger](https://meta.discourse.org/u/Erik_Manger)
#### Post date: [2015年十月21日 15:03 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/22 "2015-10-21T15:03:42Z")

</div>

Is it just me or does nothing seem different?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [2015年十月21日 15:05 UTC](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679/23 "2015-10-21T15:05:34Z")

</div>

If you don’t notice any differences that’s probably a good thing! The goal was to re-write it, not to change it completely. I did fix some weird behaviors along the way such as multi-line select and clicking the list icons but that wasn’t the main goal for the first stage.

[下一頁](https://meta.discourse.org/t/help-us-test-the-rewritten-composer/34679.md?page=2)
