Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-881

CKeditor doesn't work when used in environment which also initializes jQuery (e.g. Liferay Portal 6.0+)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • Freshly
    • Components
    • ckez-3.6.0.1

      When ZK is used in stand-alone environment, everything works as expected, however, if using it in (as example) Liferay Portal 6.0+, CKeditor component is broken.
      This is because Liferay also uses jQuery and initialies it's own version of it using default namespace jQuery. Then ZK takes it's turn and loads plugins. CKeditor
      performs this line of code in it's jQuery adapter (/web/js/ckez/ext/CKeditor/_source/adapters/jquery.src.js):

      var jQuery = window.jQuery;

      which effectively initializes CKeditor in different namespace than ZK itself, since ZK uses jq namespace. The correct code which works in both stand-alone and
      Liferay Portal 6.0+ environments is:

      var jQuery = window.jq;

      It would be really nice if you add this fix in future CKeditor release (currently I'm making fixed version for each CKeditor release myself).

            Hudson Hudson (Inactive)
            Serzhas Serzhas
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: