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.
 
Has any time been invested in WebDAV editing of templates or alternatives? I'm not sure if it's any better with recent releases, but SabreDAV in 1.1.1 is buggy enough to be completely unusable for most standard WebDAV clients. I've only ever had it working somewhat successfully with Coda (which isn't an application we use).

It would be great to have a more convenient way to integrate XenForo template dev with the various workflows and text editors people prefer. I'd love to be able to maintain our custom templates in something like Git. ;)
I used to detest WebDAV but now 90% of my template stuff is written using it. It took a while to find a client decent enough to work with it. For example I code in an IDE for add-ons. I found it just as much of a chore switching between an IDE and Dreamweaver as I did switching between an IDE and my browser.

Then I eventually settled on an IDE (PhpEd) and found that it has pretty decent WebDAV support. Now I do all my work in one app and love it. So pretty big conversion for me.

The new template editor improvements will be great in 1.2 though. So annoying not having tab support!
 
That is a really nice addition, thank you! Any chance for buttons to stay active and work when switched to source view(use BB code editor)?
 
What about inegration of spoiler, moderator tag and other useful bbcodes in this editor?

Will "Quote me" plugin work correctly?

Another option: let user detach editor, i.e. make it flowing above the page while scrolling it? This is usefull when I create message with multiple quotes.
 
What about inegration of spoiler, moderator tag and other useful bbcodes in this editor?

Will "Quote me" plugin work correctly?
...
It would also be useful if quotes were rendered as a visual preview, instead of simply dumping raw bbCode in to the editor textarea. :)


There's no reason anyone should need to see this stuff (at least not by default):

GNzdTh7.png
 
This new editor looks like vb5 editor. Great to see xenforo picking up what it has left behind even though it had left behind vb5 very far in many ways.
 
I don't like the way redactor looks? Is it going to be restyled?
It looks great. You can restyle it yourself if you don't like it.

This new editor looks like vb5 editor. Great to see xenforo picking up what it has left behind even though it had left behind vb5 very far in many ways.
It looks nothing like VB5:

cGUjUAn.png


XenForo 1.2:

ss-2013-05-17_12-49-20-png.46349
 
They've said it's easier to style yourself.
Yep. The markup is really clean and customization is dead easy compared to RTE's like TinyMCE.

I'll definitely be modifying the icons. A webfont icon set would be great here (vector, scales to HiDPI/Retina devices and beyond).

I don't like the way redactor looks? Is it going to be restyled?
Do you not like the XenForo style, or the stock Redactor look? Both seem fairly unobtrusive and clean to me.


XenForo
Screen Shot 2013-05-22 at 10.33.13.webp


Stock
Screen Shot 2013-05-22 at 10.32.56.webp
 
Yep. The markup is really clean and customization is dead easy compared to RTE's like TinyMCE.

I'll definitely be modifying the icons. A webfont icon set would be great here (vector, scales to HiDPI/Retina devices and beyond).


Do you not like the XenForo style, or the stock Redactor look? Both seem fairly unobtrusive and clean to me.


XenForo
View attachment 46584

Stock
View attachment 46585

I dont think the silver would go with my style..
 
Yep. The markup is really clean and customization is dead easy compared to RTE's like TinyMCE.

I'll definitely be modifying the icons. A webfont icon set would be great here (vector, scales to HiDPI/Retina devices and beyond).


Do you not like the XenForo style, or the stock Redactor look? Both seem fairly unobtrusive and clean to me.


XenForo
View attachment 46584

Stock
View attachment 46585
I meant more in terms of style properties, so that customers for pre-made styles can edit them easier.
 
I meant more in terms of style properties, so that customers for pre-made styles can edit them easier.
Ah. Well, the good news is that Redactor would also be easier to integrate with XF various style properties. I can only assume that they'll be doing this too, eventually.
 
Look for 'LetsPWN' in my sig.
You're already using quite a few colours there, so grey isn't really going to look out of place. If you wanted to change the editor toolbar background to a solid blue or something, you could then invert the the icon set to white (so it matches better).

Some custom pixelated MC style buttons could work well too, if they were done tastefully :)
 
Will "Quote me" plugin work correctly?
No, it won't. It would need to be updated. The insertion command inside the editor is not the same.
Yep. The markup is really clean and customization is dead easy compared to RTE's like TinyMCE
TinyMCE 3.x. The 4.x branch is using icon fonts.

P.S: the last two buttons of the screenshot (undo/redo) might no be there once 1.2 released, unless a none-official* undo stack has been implemented.
*: from Redactor.
 
Top Bottom