1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 A New Editor and Much Much More

Discussion in 'Have You Seen...?' started by Mike, May 17, 2013.

  1. Mike

    Mike XenForo Developer Staff Member

    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.png

    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.png

    @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.png
    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.png
    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.png
    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.
    Weydigo, nabil, Goodspeed and 230 others like this.
  2. Slavik

    Slavik XenForo Moderator Staff Member

    Woo :D
    ZeWildGuy likes this.
  3. lostincable

    lostincable Active Member

    Looks fantastic!

    Any chance with the new editor we will get the ability to re use attachments / attachment library?
  4. afistofirony

    afistofirony Member

    <3

    I think the hint was that WYSIWYG will now be available on mobile devices.

    Looking forward to early June!
    0ptima likes this.
  5. erich37

    erich37 Well-Known Member

  6. Teapot

    Teapot Well-Known Member

    Oh yes. Oh very, very yes. Thank you so much for this :D
  7. Miner

    Miner Well-Known Member

    Gr8! features and yes i like the responsive.(y)
  8. iTuN3r

    iTuN3r Well-Known Member

    Now that looks pretty awesome :)
  9. Clickfinity

    Clickfinity Well-Known Member

    Hang on, hang on ... you lot haven't even used it yet!!! :rolleyes:

    Only joking - looks good Mike - looking forward to giving it a go here on XF. (y)
  10. Claudio

    Claudio Well-Known Member

    I don't like the icons of the editor. Is that a smiley or a cake with 2 eyes?
  11. Clickfinity

    Clickfinity Well-Known Member

    Can you "style" the new editor?
    a legacy reborn and Kaynil like this.
  12. Claudio

    Claudio Well-Known Member

    ICONS MUST BE IN COLOR. If so, they'll be easier to identify.
  13. emc2

    emc2 Active Member

    You guys are doing a fantastic job! This is an excellent update and has great information! I love the fact that you give a rough time line for the release, it gives myself and I'm sure many others the ability to plan for updates/conversions. I've already bought my licence but I'll switch (all of my 200k members!) from vbulletin to xenforo as soon as 1.2 is out.

    Just superb!
    Alien, shenmuee and DoctorWatsOn like this.
  14. jmurrayhead

    jmurrayhead Well-Known Member

    To quote Macklemore, "This is f***ing awesome!"
    Alien, yavuz, DoctorWatsOn and 4 others like this.
  15. afistofirony

    afistofirony Member

    I'm sure you'll be able to change the images to your liking, just as you can now. :p
  16. lostincable

    lostincable Active Member

    Why?

    What about people who are colour blind?
    D.O.A. and Walter like this.
  17. Neal

    Neal Well-Known Member

    Maybe an option to have the editor coloured or grey scale. I like the one shown here though.
    Kaynil and shenmuee like this.
  18. Claudio

    Claudio Well-Known Member

    You'll see the icons no matter which color they have. Your problem will be if you want to select a specific color for a text for example..
  19. John

    John Well-Known Member

    Good stuff, Mike! 1.2 sounds like it's going to be a milestone release for Xenforo.
    AlexJOwen, Alien, Lucas and 3 others like this.
  20. Claudio

    Claudio Well-Known Member

    mmm I think you're right. The editor uses sprites:

Share This Page