XF 2.2 Text editor and attachment manager improvements

1596357822277.webp
Central to the experience of interacting with forum software is the interface through which visitors will create their content. This is usually done through the text editor and attachment manager, so keeping these systems fresh and inspiring is very important to us.

From the outset, XenForo has employed a rich text editor (RTE) to allow visitors to compose their messages in a what-you-see-is-what-you-get (WYSIWYG) interface, so that bold text is shown emboldened, large text is appropriately large etc., rather than working directly with the underlying BB code in order to take the guesswork out of message editing. We've always built a custom implementation on top of what we consider to be the best-in-class tools, and through the life of the XenForo we have already made major switches to completely new libraries twice, moving from TinyMCE to Redactor and then to Froala.

With XenForo 2.2, we have made another major change to our implementation. We continue to build upon Froala, but we have improved every aspect of our system.

We'd love you to read what we've put down here, but if you're pushed for time...

tl;dr

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
We only support 1-3 (which map to 2-4).

Worth noting that the font sizes are 24px for heading 1 (h2), 20px for heading 2 (h3) and 17px for heading 3 (h4).

While there are other heading tags in HTML they should be mostly unnecessary. If we had heading 4 (h5) it would probably be 15px - that’s the same size as the default text anyway so not sure how relevant that is.

Even smaller headings probably don’t make much sense either.
 
In typography, size is but one method of distinguishing headings. Other methods include different font weights, styles (italics), variants (small caps), letter spacing, etc. We use all six levels of heading. If you supported H2–6 that would allow us to substitute the new BB codes for our current custom ones. Be it as it may, we'll adapt. Keep up your good work!
 
2 questions:

If we already have the HR tag as custom BB code, what will happen when updating to 2.2 which includes it? I would prefer it overwrites my custom one.

When you are in the normal BB Code editor (not WYSIWYG), will we be able to use the BB code buttons? I'm surprised that they're disabled currently in 2.1.
 
When you are in the normal BB Code editor (not WYSIWYG), will we be able to use the BB code buttons? I'm surprised that they're disabled currently in 2.1.
AFAIK no. Froala doesn't know anything about BB Code so it would be a major undertaking to build this support - and a real nightmare to maintain it afterwards.
vBulletin tried that with CKEditor which apparently made it unmaintainable.
 
We’re using

etc.


Is there by chance a second option to define an anchor for headings so that we can easily (and possibly a developer) make a table of contents from a post's headings?

i.e. [HEADING=1, theFirstParagraph] in order to have a link, like, /threads/text-editor-and-attachment-manager-improvements.181715/post-1435966/#theFirstParagraph (or even automated post-1435966-h1-1 to take out anchors that may overlap) work.

As this post was overlooked:

Thanks​

 
I would like an option when attaching images to post them as full size by default (dont even show the option to insert image as thumbnail)
Images have BB Code of [ATTACH type="full"] in order to display the full image. I think disabling the use of [ATTACH], which posts the thumbnail alone, is out of scope and not desirable for most people. I would first suggest using the Styling and customization questions forum (prior to a suggestion now) after 2.2's release instead to see if this is possible, as it merely inserts the two different BB codes as it stands in 2.1, with a template edit:

1592446797738.png 1592447217544.png

(Obviously, this is 2.1, but I would imagine 2.2 would offer the ability for a fairly simple template modification where you can merely press the photo [as opposed to hovering it for a thumbnail/full image] to insert it as a full image only. However, this can always be overridden by the user presumably changing the BB code manually in the plain text editor.)
 
AFAIK no. Froala doesn't know anything about BB Code so it would be a major undertaking to build this support - and a real nightmare to maintain it afterwards.
vBulletin tried that with CKEditor which apparently made it unmaintainable.
Would it be that complicated though? Click one of the buttons and it inserts the empty tags where ever the cursor is. Click one of the buttons with text highlighted and it puts the BB Code around it (excluding some tags).
 
@Chris D i will post again, seems im being overlooked

I would like an option when attaching images to post them as full size by default (dont even show the option to insert image as thumbnail)
Generally speaking, if we didn’t show or reference something, it’s unlikely to be a feature. This is case here.

If this is something you’re interested in, best to post a suggestion (or join an existing one, if there is one).
 
No - H1 tags are already used on the page so there shouldn't be another one.

HTML:
<h1 class="p-title-value"><span class="label label--primary" dir="auto">XF 2.2</span><span class="label-append">&nbsp;</span>Text editor and attachment manager improvements</h1>
I'm still wrapping by head around what you've said, the two questions being:
  1. Headings, as opposed to titles, by their very semantics are repeatable elements of a document. Documents may and often times do contain a number of H1's, H2's, etc. Consequently, I do not follow the logic behind your "there shouldn't be another one," why? Which brings me to the next question:
  2. In your code snippet, why is what is semantically a title marked up as a heading? Why <h1> when it should (seemingly) be <title>?
Just trying to understand what I'm missing.
 
Traditionally speaking, there's only one H1 tag on the page and it should define what the page is about. So sort of by extension, any headings you might use in an article don't change the purpose of the article itself and thus would be nested under that. (Headings create a document outline based roughly on the numbers descending/ascending.) Thus, we don't allow individual posts to specify an H1.

n your code snippet, why is what is semantically a title marked up as a heading? Why <h1> when it should (seemingly) be <title>?
Title tags are only applicable in the <head> tag. They don't represent on page content.
 
Top Bottom