-
Improvement
-
Resolution: Fixed
-
Minor
-
2.7
-
MOODLE_27_STABLE
-
MDL-44164-master-2
-
100
-
FRONTEND Sprint 11
I've put together a (mostly) working PoC to restructure the atto code.
At present, the code is based around a structure which must be aware of every editor on the page. We have to pass around an elementid, and each plugin adds buttons to their own element, but with a single click handler.
The code also does not meet the coding style guidelines.
IMO, we need to refactor this to:
- not pass around the elementid;
- comply with coding style requirements;
- include API documentation to assist plugin developers;
- have one editor instance per editor;
- have instances of the plugins on each editor rather than globally.
This will:
- make our lives far easier in the future to maintain because we'll be reducing the code duplication;
- allow people to write plugins more easily and with much less code duplication;
- which will allow for a greater diversity of plugins in a shorter period;
- give better confidence from third-party developers writing plugins for the new editor, and as a result the community as a whole (just think how much we've complained about the TinyMCE plugin structure).
Personally, I feel that this needs to be done before integration, and certainly before release.
I've been working on a PoC which is semi-functional (35% of plugins are already done and the others aren't far off) and it only took a few hours to write including appropriate API docs.
- caused a regression
-
MDL-44674 Atto wrapCallback setting should not exist
-
- Closed
-
-
MDL-44675 Remove focusAfterHide hack from getDialogue function
-
- Closed
-
- is blocked by
-
MDL-44084 Integrate Atto
-
- Closed
-
- is duplicated by
-
MDL-44238 Atto: Convert the code to use class instances rather than static classes
-
- Closed
-
- will help resolve
-
MDL-44129 Atto: Reduce the number of events delegate() for the toolbar
-
- Closed
-