The "Drupal" plug-in allows AE users to define which tags are allowed in a specific editable (this maps to Drupal's text formats/filter system). Currently, the Drupal plug-in for AE has to maintain its own (HTML tag -> AE UI elements) mapping, so that it knows which UI elements to hide/disable whenever the corresponding HTML tag is disallowed by the current text format.
To ease our implementation, each UI element should at least be "tagged" to correlate with a certain HTML tag. That would mean we would no longer have to maintain our own mapping. Less maintenance, but also far less fragile (i.e. it currently breaks down if you install new plug-ins, whose UI elements we obviously cannot magically know).
It would be ideal if AE would incorporate such a system itself. Then it's no longer an afterthought and can be architected in a much better way.
Comments
Comment #1
Wim LeersPlease also read @quicksketch's excellent rant: #1825214-1: Block-level tag drop-down not correctly showing/filtering options based on enabled tags.
Context:
But now, I'm happy to say I've actually fixed the way we deal with this. No more hacky stuff. No more global configuration. It's still not optimal, but now it's definitely bearable. All the Drupal plug-in does right now, is provide two repositories: one with links, one with images.
See http://drupalcode.org/project/aloha.git/commit/7f5ada0.
While doing this, I ran into some issues though:
- I fixed it for the Image plug-in: https://github.com/alohaeditor/Aloha-Editor/issues/786.
- I reported it for the Align plug-in: https://github.com/alohaeditor/Aloha-Editor/issues/793.
- Paste handling is broken due to an upstream bug (in the ContentHandler system), Rene Kapusta of Aloha Editor is investigating this right now.
Also note once more that implementing this in a more clean manner will only be possible once https://github.com/alohaeditor/Aloha-Editor/issues/794 is solved. Marking this issue as fixed, I left a @todo in the code to make sure I don't forget.