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.
 
The fact it allows easy upload files into your server. In TinyMCE most people hosted images in other sites or linked them, with this they can simply drag and drop and host everything in your server. Even Copyrighted content.

If there is a permission to turn such thing off, or follow the Upload File Permissions, it's good.
This is no different from attachments so the issue is negligible.

If you get a DMCA, just remove the copyrighted material and the access to that given user if they abuse the ability to upload images/files.
 
I still do not quite understand it:
so is it possible with Redactor to "pin" images like with a Browser-Bookmarklet ?

Thanks for confirmation/explanation.
 
One bad thing about this Redactor far I saw in it's examples it's how we can't easy colour several parts of one topic with the same topic. Far I saw we need to click and select over and over again until the formatting is done.
Congratulations, you've just understood how good was the dom management of this version of this editor. This can't be fixed, it must be freshly coded. Redactor developers think to integrate as an option an external js library. I've tried but fail to make it work on all browsers (see here).

And it does not allow pick colours by the HEX?
By default no. I've converted the TinyMCE color picker with jQuery Commands (instead of TinyMCE code) and it "works", as far as we can say the dom insertion "works".
 
I'm failing to see this entire attachment issue. Or is this the only thing we can figure out to complain about in this HYS.
 
Congratulations, you've just understood how good was the dom management of this version of this editor. This can't be fixed, it must be freshly coded. Redactor developers think to integrate as an option an external js library. I've tried but fail to make it work on all browsers (see here).

By default no. I've converted the TinyMCE color picker with jQuery Commands (instead of TinyMCE code) and it "works", as far as we can say the dom insertion "works".
I see. But in this decision of replace TinyMCE it should improve the user-side of work with it, in this case it's about the same thing, but without less issues (that the user-side won't notice at all). In that I'm also confuse about the Media Linking, TinyMCE accept several links and auto-converts them into the BBCODE... Redactor requires the Embed Code? :(

Edit: Well it's based in Redactor it's going to be adapted I hope it works nicer.
 
I now (somewhat) regret mentioning Redactor, TinyMCE, CKEditor, etc. You can't really look at the demo websites and learn much about what is going to be implemented in XF. The needs (and options) of an editor that is translating to BB code and for use in a forum are very different from the needs of a full HTML document editor.

As I said in the opening post, it's "based on" Redactor, as much as our current version is "based on" TinyMCE. There's plenty of custom and modified functionality to fit our needs. Obviously we're still using the basics, but when you get into things like overlays and inserting complex tags, it's completely different.
 
Oh no!

I don't like change :(

Although I do like TinyMCE (Lithium uses it, and I like Lithium. Lithium integrate it better though).

Oh well, I guess I'll have to get used to it :)

Also, thanks for the time framing!


[This will also break my Macros addon]
 
The needs (and options) of an editor that is translating to BB code and for use in a forum are very different from the needs of a full HTML document editor.

This needs to be emphasised. If people want all the extra BBCode, they should add it in themselves. For the most part, we're all going to be perfectly happy with the 'default' BBCode.

I'll be very much happy with redactor as a 'basic' editor :)
 
The fact it allows easy upload files into your server. In TinyMCE most people hosted images in other sites or linked them, with this they can simply drag and drop and host everything in your server. Even Copyrighted content.

If there is a permission to turn such thing off, or follow the Upload File Permissions, it's good.
I tried explaining it, but don't bother. People will just have to learn from experience.
 
the Media Linking, TinyMCE accept several links and auto-converts them into the BBCODE...
Redactor requires the Embed Code? :(
It is a separated function which still works whatever the editor is.

it's about the same thing, but without less issues
If we're not talking about design & styles integration (for which the current system is horrible), the current & default editor, as it is used, has one issue that can't be fixed from php code: source. I haven't found any others, nor have been informed about. I'm not sure if the current version is compatible with modern browsers from mobile devices, but the last 3.x version seems to be (at least on my devices). But anyway this branch is clearly old fashioned and needs to be get rid of from a new product.
 
Hi Mike,

Thank you for the update and it looks like you have done a fantastic job, can't wait for v1.2.

A few questions if I may:

1) Will there be a toolbar in BB code mode?
2) Will there be a toolbar for tablet users?
3) Can we force the use of BB code mode as the only mode available? I really dislike anything to do with WYSIWYG and don't think a forum editor needs this mode.

2 is already here with TinyMCE....
 
As I said in the opening post, it's "based on" Redactor, as much as our current version is "based on" TinyMCE. There's plenty of custom and modified functionality to fit our needs. Obviously we're still using the basics, but when you get into things like overlays and inserting complex tags, it's completely different.
Mike, I would certainly not criticized your integration and all custom codes. What both of you done with TinyMCE three years ago is still the best integration that can be seen of TinyMCE (the overlays put aside, but that was an official plugin). The problem that users might have with Redactor would not come from your code but from the fact that your code "is based" on Redactor's. There are some lacks, that's obvious and I don't see how you would find the time to write this editor missing parts. Now, yes this editor would certainly be ok for most of users. But it remains the current base of this version (of Redactor, not your code) is still not a good one. That's said, so I will now pass to something else. Anyway thanks for your efforts to make the version 1.2 better.
 
Android tablet users do ;)

My understanding is that the iPad currently represents about 98% of the tablet users in this world. So it would be very important to make sure that the new editor has a toolbar that works with the iPad as they are very popular on some forums, I know they are on mine.
 
My understanding is that the iPad currently represents about 98% of the tablet users in this world. So it would be very important to make sure that the new editor has a toolbar that works with the iPad as they are very popular on some forums, I know they are on mine.

People with iPad's have been brainwashed by Apple. They are mainly lower end than their Android alternatives, and nothing works on them.

Also, this is an issue with TinyMCE not xenForo :)
 
Back
Top Bottom