craftcms / craftcms/cms

Allow adding new tools to the Image Editor

Open
#3,334 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

assets :file_folder:
Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
1d 5h
Merged PRs (30d)
134

Description

Plugin creators can add main nav positions quite easily, using EVENT_REGISTER_CP_NAV_ITEMS event.

I suggest adding similar mechanism to image editor template. Right now we have just image_editor.html template with all nav positions on left and settings buttons hardwired. Instead of that, there should be array containing names of menu position on the left, and paths for template files of "views" like rotate settings and crop settings.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the image_editor.html template and compare its hardwired left navigation and settings buttons with the existing EVENT_REGISTER_CP_NAV_ITEMS mechanism. Define how menu positions and view template paths should be represented and exposed to plugin creators. Done means image-editor tools can be added through the proposed mechanism without editing the core template.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.