XF 1.2 A New Editor and Much Much More

I've never hidden my frustrations with XF 1.1's editor (which is based on TinyMCE). In 1.2, we have entirely removed the existing editor and replaced it with a new one based on Redactor:
ss-2013-05-17_12-21-49.webp


So obviously this looks quite a bit different--and I know plenty of people didn't like the 1.1 editor look--but the functionality is there. So what advantages do we have? Well there are various ones:
  • Much lighter code and faster to load. Redactor depends on jQuery and benefits from that.
  • When pasting, most formatting is removed (though some is kept). However, if you're pasting from one XenForo editor to another (or within the same one), all formatting is maintained.
  • White space is maintained for code tags when pasting from Webkit. This was an annoyance for a number of people here, myself included. :)
  • The overlays are now consistent with overlays elsewhere in XF.
  • Generally, from my perspective, the code is much more adaptable to our needs.
  • A bunch of other things I'm going to detail below...
For the most part, the editor simply shouldn't get in your way so in a sense, you shouldn't actually see much different for the average post.

How about some other bigger changes?

Pasting images
If you use Chrome or Firefox and have an image in your clipboard, you can simply paste it into the editor. It will automatically be uploaded as an attachment if possible. If the upload is successful, this works exactly like uploading an image and then clicking the "full image" button.

Note that in Chrome, the image data must be in your clipboard (such as from pressing print screen). In Firefox, you can either have image data or you can copy a file that's an image and paste that.

Drag and drop uploading
Provided your browser supports it, you can now drag files into the editor to upload them:
ss-2013-05-17_12-37-47.webp


@User tagging
While not directly related to the editor change, this is probably the best time to mention it. You can use @Mike style syntax to tag users in a post:
ss-2013-05-17_12-39-42.webp

Tagged users will receive an alert when they're tagged.

You can obviously turn off tag alerts, but as an admin, you can also limit the maximum users that can be tagged per message as a permission. (So you could disable it for registered members and only allow premium members to tag, for example.)

Alternative smilie inserting approach
The smilie dropdown really didn't work well with a lot of smilies. Clicking the :) button will now do this:
ss-2013-05-17_12-42-10.webp

This is now making a call to get the smilies and lays them out with a template. This opens up the possibility for more organization options (though nothing has changed as of this message).

Auto save drafts
While you are typing a message, every X seconds (currently 60), a draft of your message will be saved. If you reload the page later, your message will be automatically re-shown. Drafts will be automatically pruned over time.
Each draft is associated with a particular piece of content, such as a thread, forum, or conversations. A draft reply that you start working on in thread 1 will not be shown to thread 2 and so forth.

Display if messages have been posted since you started your message
Tied into the auto-saving, when you're writing a reply to a thread, we will check to see if any new messages and display a note if there are. You can then display those new posts without reloading the page.




Oh yeah, one more thing on the editor, it's fully responsive:
ss-2013-05-17_12-49-20.webp

That should be a hint... :)



So, when are we going to see this all? Well, we're hoping to have 1.2 running here on XenForo.com in early June. The initial beta release will follow, based on how well the time on 1.2 goes. The final release of 1.2 would be wholly dependent on how the beta process goes.
 
Feedback:
  • A memory stack has been implemented
  • The dom selection has been fully rewritten (the function is quite impressive almost 10% of the code)
  • The html<=>bbcode converter still doesn't clean unnecessary bbcodes after the html conversion
  • The smilies box appears twice if you click twice on the button (may be the clicks have been done too quickly)
  • After some pastes, the autoresize sometimes has bugs (the height is lost and there is no overflow)
  • The shortcut ctrl+u doesn't underline the text but open the page source on FF
  • Many users ask for the caret position after a Bb Code insertion to be before the ending tags (it hasn't been modified)
  • The modal window have been replaced... it's fast but, well, not very sexy (not important)

The major lacks of Redactor are no more there, which is really good. Now that also means that this version of this editor (which is a kind of new branch of Redactor) will have to be updated by XenForo itself which will require more work.
 
The auto drafts feature is truly impressive. I already forgot about the announcement until I just revisited a thread where I intended to reply earlier - and I was quite surprised (positively so) to find my old draft there in the quick reply box. (y)
 
I don't like this editor that much, it adds new feartures and fixes but...
It makes my life a bit harder.

Since the color text comparing to old editor, it doesn't get the color selected to only select and 1-click color the text, i must select, open the colors menu, and add it again over and over again. (i use such function often)

And why can't i link one url to an image? Also can't select image and edit its url like the old editor? I guess that's not yet working. I was hoping image resize would be here with this new editor, well it's ok anyway.

This editor is nice, but it adds more menus, and less 1-click apply formatting.
 
Last edited:
Hence why I said it's based on Redactor... :)

Yes... that also means you might have to spend a lot of time as a developer to fix issues (especially cross browsers problems which are numerous with wysiwyg editors) instead of relying on the support of imperavi which you've already paid. If it can be done fast, that's great, otherwise it's going to be time consuming. Anyway, that's a really good integration for end users, congratulations for it, but Redactor still doesn't fit my needs as an Editor (job): the multiline buttons, the buttons that are not easy to customize since there are two set of icons to update the "retina display", and to be very honest the plugins ; nothing you can do there. So please try to make the html<>bbcode parser extendable to let the choice for developers and users.
 
Is it possible to take menus away adding the align and link/unlink as separate buttons?
How to select an image to add a link to it?

Oh lol i was trying to move a image to another line it instant activated the drag & drop upload, but no upload at all.
 
The editor is definitely an improvement over the old one and it looks better. I however think, there's room for more aesthetic improvements. For eg: the button sizes could go a tad smaller imho. That way, it better blends in with the rests of the blue link bars on top and bottom. May be its the curved boxy outlines that makes the buttons look big. Just my suggestion. :)
 
I prefer the @ sign to be removed after the post is submitted. I don't see the point keeping the @ sign after submission. The Tag Me addon had an option to do this. Also when the popup with the list of user shows up, it should show up where the @ sign is located, not on the left side of the screen all the time.
 
I prefer the @ sign to be removed after the post is submitted. I don't see the point keeping the @ sign after submission. The Tag Me addon had an option to do this. Also when the popup with the list of user shows up, it should show up where the @ sign is located, not on the left side of the screen all the time.

Personally I prefer the @ to be included (which I have done with the Tag Me add-on). Maybe an option to include it or not but not a total removal.

I am quite happy with where the pop-up list of users is, though that's probably because I'm used to its location from the Tag Me add-on.

Possible bugs? Names with a space in them don't seem to appear with tagging. For example, @DJ XtAzY doesn't appear. Also I note that when I tag @Brogan a Brogan&#00 also appears in the dropdown. I can't select Brogan&#00. I wonder if I can tag without selecting? @Brogan&#00

**EDIT** So tagging does work for these users, it's the selection from the name dropdown that's the issue.
 
Top Bottom