Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content Model: Add model into ContentChangedEvent #2076

Merged
merged 14 commits into from
Sep 22, 2023

Conversation

JiuqingSong
Copy link
Collaborator

In order to prepare for cached model, we need to include content model in ContentChangedEvent, so that plugin can get the latest model which causes this change.

In this change I add a new event interface ContentModelContenetChangedEvent, with two new properties:

  • contentModle
  • rangeEx

Then let editor API setContentModel returns the new rangeEx which is already returned from its underlying core API.

Finally, I modified formatWithContentModel to let it trigger ContentModelContentChangedEvent with the latest content model and range ex.

Currently these results are not used, but later I'll add another change that will read this result and cache it.

@JiuqingSong JiuqingSong merged commit 31fa011 into master Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants