Ckeditor.js always loaded

Hi,

this addresses the following commit:

From the commit message it sounds really odd to me to always load the
130k ckeditor.js to have ability to disable ckeditor on some textareas
in RTIR.

The ckeditor is only used on very few pages within RT. Maybe there is a
better way to load the ckeditor.js only on the pages where it is needed
and only if $MessageBoxRichText is set to true.

Chris

this addresses the following commit:
add $Type to %ARGS so we can specify the type of the textarea in the … · bestpractical/rt@c1c91d2 · GitHub

From the commit message it sounds really odd to me to always load the
130k ckeditor.js to have ability to disable ckeditor on some textareas
in RTIR.

The ckeditor is only used on very few pages within RT. Maybe there is a
better way to load the ckeditor.js only on the pages where it is needed
and only if $MessageBoxRichText is set to true.

This pushes the ckeditor JS to being loaded on the first page load
(generally the login page), where any delay is less noticeable than when
a user is gung-ho to reply, and must wait for the JS to load. It also
allows us to combine it with the existing JS, which works around the
serial requesting which browsers do for resources from the same server.

It does incur a small penalty on sites which have
Set($MessageBoxRichText, 0) in their configurations, and for users that
have disabled it in their preferences. However, caching amortizes this
cost sufficiently that it far outweighs the code complexity that would
come with a solution that attempts to “smartly” load the ckeditor JS (or
not) on a per-page basis.

  • Alex

This pushes the ckeditor JS to being loaded on the first page load
(generally the login page), where any delay is less noticeable than when
a user is gung-ho to reply, and must wait for the JS to load. It also
allows us to combine it with the existing JS, which works around the
serial requesting which browsers do for resources from the same server.

It does incur a small penalty on sites which have
Set($MessageBoxRichText, 0) in their configurations, and for users that
have disabled it in their preferences. However, caching amortizes this
cost sufficiently that it far outweighs the code complexity that would
come with a solution that attempts to “smartly” load the ckeditor JS (or
not) on a per-page basis.

  • Alex

Thanks Alex.
I was so focused on the server side that I forgot about client side
browser caching.

Chris