Jump to content
Matt
 Share


IP.Board 3.4 Dev Update: Editor improvements

With a product history of over ten years, it's quite often a challenge keeping the product right on trend. Old technologies go and we make provisions to remove them and likewise, we make provisions to incorporate new technologies.

For example, IP.Board was the first bulletin board to incorporate Ajax functionality all the way back in IP.Board 2.1 back in 2005. We were also one of the first boards to add in 'WYSIWYG' editing to make constructing styled posts much easier. Of course, this was long before jQuery and Prototype frameworks make writing javascript easier so we hand-rolled our own editor. This was eventually replaced in February 2011 with the arrival of IP.Board 3.2 in which we used CKEditor.

However, the underpinnings of the editor remained unchanged which lead to some challenges. For example, the actual post was saved as BBCode in the database. This meant that the post had to be converted into BBCode before saving and then converted back into HTML before editing or showing the post. This lead to some frustrating due to inconsistencies with this process.

Happily, the underpinnings to our editor have now been completely rewritten to increase stability and to remove these inconsistencies. Now, the post is actually saved as cleaned HTML (via the excellent HTMLPurify) which means it does not have to be converted between states. You can still edit the BBCode manually if you wish, but this is handled by a single BBCode plug-in for CKEditor. This is very exciting because it frees up IP.Board from having to deal with BBCode manually saving hundreds of lines of code.

Of course, your custom BBCode will work normally and because of built-in legacy functionality you won't need to convert your posts to the new format as this is handled 'on-the-fly'.

We've also taken the time to improve several other elements within the editor:

Code Boxes
The code box has been improved to allow you to select the code format (HTML, Javascript, PHP, etc) and a starting line number. Tabs and spaces are also preserved correctly.


Live Previews
When adding quote and code boxes, the editor will preview them live, like so:


The code box when rendered fully contains striping and line numbers which makes it easier to read the code:


We're confident that by rewriting the editor and parsing engines, the editor in IP.Board 3.4 will be much more stable and reduce those annoyances which can sometimes crop up when writing complex posts.

 Share

Comments

Recommended Comments



Will there be any changes to the editor to make it skinnable per skin 100%? Right now, only a couple parts of it can be done in each skin, but the rest is hard coded into the board global files and make for inconsistencies on dark skins and a pain to edit when making a skin.

Link to comment
Share on other sites

  • Management

This editor update was mostly to improve stability. I'll go through a few points raised:

- Will editing posts in bbcode mode actually work with buttons again?
I really don't see the value in spending time working on the 'source' (BBCode mode). I really hope that with the improvements more will use the RTE mode.

- What about the option to make a table? It's really strange that there isn't such option
I'm thinking that in IPS 4 we look at adding this. Right now there isn't corresponding table code so moving from RTE to BBCode when editing will make the table vanish.

Is it going to convert all existing posts content from BBCode to HTML in database then?
There's no need. The data is parsed and cached in the cache tables as HTML. It'll just update them if/when you edit them.

What if the HTML for a bbCode is changed, how will that affect a post if it's edited or if the rebuild posts tool is used?
There is no change from what happens now. Custom BBCodes are parsed on the 'display' method.

I've written a dev guide here: http://community.invisionpower.com/resources/documentation/index.html/_/developer-resources/api-methods/34-editor-and-parsing-methods-r797

Link to comment
Share on other sites

[quote name='Matt' timestamp='1343980538']
- Will editing posts in bbcode mode actually work with buttons again?
I really don't see the value in spending time working on the 'source' (BBCode mode). I really hope that with the improvements more will use the RTE mode.


This is saddening given this post from you back in November:
http://community.inv...20#entry2193192

Pretty sure that was back on 3.2 as well. Plenty of people still prefer to not use RTE.

Link to comment
Share on other sites

[quote name='Matt' timestamp='1343980538']
- Will editing posts in bbcode mode actually work with buttons again?
I really don't see the value in spending time working on the 'source' (BBCode mode). I really hope that with the improvements more will use the RTE mode.

Very very sad.

Link to comment
Share on other sites

I, too, am sad, I do not like the RTE and will never move to it full time until the old mode gets phased out completely. I don't like not knowing the 'real' content of what I'm writing (the HTML code behind the scenes).

Link to comment
Share on other sites

And you don't hold your promise.. again.. Sad, sad. The STD editor should be worked on, it'll always be more superior than any wysiwyg-editor. A majority of experienced users prefer to use the STD-editor on our forums. That's a lot of people...

We are losing guides, FAQs and other large posts with many images etc. due to this.

@Peter: commented in your topic aswell.

Link to comment
Share on other sites

[quote name='Matt' timestamp='1344249390']
Are you sure about that? Can you speak on behalf of all IPS customers? :smile:

I speak only from myself and members of my forum (~10k every day).

If you will make a poll you will be convinced that the implementation of the buttons - the most anticipated feature editor.

But somehow I'm sure you will not make this poll.

Sorry for my english.

Link to comment
Share on other sites




Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...