Skip to content

fix(embed): guard unavailable search commands - #8970

Merged
mejo- merged 1 commit into
mainfrom
jtr/fix-richEditDisabled-embedGuard
Aug 5, 2026
Merged

fix(embed): guard unavailable search commands#8970
mejo- merged 1 commit into
mainfrom
jtr/fix-richEditDisabled-embedGuard

Conversation

@joshtrichards

Copy link
Copy Markdown
Member

📝 Summary

When rich_editing_enabled = 0, the collaborative editor created through Text’s integration (embed) API uses the plain-text editor. This editor does not include the Search extension, so the related commands are unavailable.

Guard the embedded editor API calls to:

  • setSearchQuery
  • searchNext
  • searchPrevious

When these commands are unavailable, the methods now safely behave as no-ops instead of throwing an exception.

This allows integrations such as Collectives to finish loading when rich editing is disabled.

🖼️ Screenshots

🏚️ Before 🏡 After
B A

🚧 TODO

  • ...

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

Assisted-by: Copilot:gpt-5.6-luna

Signed-off-by: Josh <josh.t.richards@gmail.com>

@mejo- mejo- left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @joshtrichards. Tested locally and works well ☺️

@mejo-
mejo- merged commit 122fd46 into main Aug 5, 2026
61 checks passed
@mejo-
mejo- deleted the jtr/fix-richEditDisabled-embedGuard branch August 5, 2026 10:01
@mejo-

mejo- commented Aug 5, 2026

Copy link
Copy Markdown
Member

/backport to stable34

@backportbot

backportbot Bot commented Aug 5, 2026

Copy link
Copy Markdown

The backport to stable34 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable34
git pull origin stable34

# Create the new backport branch
git checkout -b backport/8970/stable34

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 286926a6

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/8970/stable34

Error: Failed to check for changes with origin/stable34: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@mejo-

mejo- commented Aug 5, 2026

Copy link
Copy Markdown
Member

/backport to stable33

@backportbot

backportbot Bot commented Aug 5, 2026

Copy link
Copy Markdown

The backport to stable33 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable33
git pull origin stable33

# Create the new backport branch
git checkout -b backport/8970/stable33

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 286926a6

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/8970/stable33

Error: Failed to check for changes with origin/stable33: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@mejo-

mejo- commented Aug 5, 2026

Copy link
Copy Markdown
Member

Manual backport to stable34 at #8981.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

won't work with rich editing off

2 participants