Skip to content

Marky fixes and refreshment - #7740

Draft
denyshon wants to merge 1 commit into
mozilla:mainfrom
denyshon:fix-link-button
Draft

Marky fixes and refreshment#7740
denyshon wants to merge 1 commit into
mozilla:mainfrom
denyshon:fix-link-button

Conversation

@denyshon

Copy link
Copy Markdown
Contributor

Resolves mozilla/sumo#3221, resolves mozilla/sumo#3230, resolves mozilla/sumo#3231, resolves mozilla/sumo#3232, resolves mozilla/sumo#3234, resolves mozilla/sumo#3235, resolves mozilla/sumo#3233, resolves mozilla/sumo#3236.

  • Update the JS code for Marky (switch from prototypes to classes, var -> const/let, etc.).
  • Drop old IE-specific code (IE won't be able to run the updated code anyway).
  • Split SimpleButton into two classes: MarkupButton (which keeps the old behavior) and InsertButton (which replaces the selection instead of framing it).
  • LinkButton, MediaButton, CannedResponsesButton and QuoteButton now inherit from InsertButton, which also contains some shared code.
  • Unify selection creation for codemirror and regular textarea.
  • Switch LinkButton kbox to and make the link fields required (link type must be selected, and a link for this type must be specified). Disable the Insert button until the form is valid.
  • Add a missing </div> in the LinkButton kbox html template (its absence led to an extra margin at the bottom).
  • Allow submitting links without text.
  • Other fixes and improvements.

@denyshon
denyshon marked this pull request as draft July 27, 2026 05:48
@denyshon

Copy link
Copy Markdown
Contributor Author

I'll need to rewrite this since #7718 has been merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment