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 options to style the new editor are in the Style Properties >> Rich Text Editor
Inside the post must be discipline for all users except admins & moderators/stuff, ihmo.
Without any red bold text. The appearance/style of editor is not so important.
Otherwise it will mess.
 
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.

Which factor decides if the image will be uploaded as attachment or not? I've tested this feature and only in a very few cases the image gets uploaded as attachment. For instance: When I c&p something where an image is hosted on imageshack, the image won't be uploaded on my server.

It would be nice if someone could shed some light on that function.
 
Which factor decides if the image will be uploaded as attachment or not? I've tested this feature and only in a very few cases the image gets uploaded as attachment. For instance: When I c&p something where an image is hosted on imageshack, the image won't be uploaded on my server.

It would be nice if someone could shed some light on that function.
Right click, 'Copy Image' (NOT Image URL), focus the editor, Ctrl+V.
 

Attachments

  • upload_2013-7-3_14-28-20.webp
    upload_2013-7-3_14-28-20.webp
    1.2 KB · Views: 43
I'm packing for a trip currently, but I came across this issue a couple of days ago and just now got around to asking about it. (I did a quick search before posting here but the terms are too vague to find what I want.)

Anyway...

Is there going to be a way to turn off the uploading of attachments that are copied and pasted into a post? I currently use that method to display images in a post that are hosted elsewhere--it is worlds easier than having to insert a URL in the "Image" button in the editor.

The big problem we are having on our main forum is that we allow limited attachments to be uploaded (abusers are reprimanded), and we are trying to encourage others to use off-site image hosting rather than eat up expensive space on our SSDs. Pasting in an image from another site is well and good, but we do not want that hosted on our server at all (especially if it is in one of our very pointless off-topic threads).
 
Sorry if it had been asked earlier but why every image is being uploaded instead of being posted from external link as it used to behave in XF 1.1.0 ?

upload_2013-7-12_20-19-43.webp
 
I asked a similar question three posts above yours. I do need a way to disable that feature--a lot of our members post images from other sites (such as cover images from Amazon, images shared via image sharing services, etc.) that really do not need to be hosted by us for any reason. I'd prefer it be an on/off setting, possibly tied to usergroups so that we could give staff members this ability but not the general membership.

I do like the feature (it's pretty cool actually), but for a big board it is highly impractical to let everyone have it.
 
Sorry if it had been asked earlier but why every image is being uploaded instead of being posted from external link as it used to behave in XF 1.1.0 ?

When you copy an image and then paste it into the editor, the image will become an attachment. Are you wanting the disable the copy/paste image function? I agree this sort of function needs to have an enable/disable switch in the Admin CP.
 
When you copy an image and then paste it into the editor, the image will become an attachment. Are you wanting the disable the copy/paste image function? I agree this sort of function needs to have an enable/disable switch in the Admin CP.
The copying and pasting of images in 1.2 changes the functionality of what we currently have in 1.1x. This will catch a lot of people out as they will unwittingly end up uploading images instead of linking to them. Yes there's server space to consider but also copyright of images, some sites are very fussy about people taking their pics and hosting them elsewhere.

I agree, some sort of enable/disable switch in the AdminCP could be an idea. I do wonder whether Xenforo should revert to the original functionality of copying and pasting images and if users want to upload images they have to use the current 'upload a file' method.
 
Top Bottom