Skip to content

Content Model Selection API step 3: Add new selection API#1478

Merged
JiuqingSong merged 7 commits into
masterfrom
u/jisong/selection3
Jan 5, 2023
Merged

Content Model Selection API step 3: Add new selection API#1478
JiuqingSong merged 7 commits into
masterfrom
u/jisong/selection3

Conversation

@JiuqingSong

Copy link
Copy Markdown
Collaborator

Add new selection related API:

  • setSelection: set selection of a content model to the given content. If there is already other selections, clear them
  • deleteSelection: Delete selected content, handle all kinds of cases
  • mergeModel: consume setSelection and deleteSelection, to merge a given content model into an existing one and replace selected content
  • insertContent: consume mergeModel API to insert given HTML content or DOM node or content model into existing content using content model
  • insertImage: A public API to consume insertContent() to insert image into editor

@JiuqingSong JiuqingSong changed the title Content Model Selection API step 3: Improve existing code Content Model Selection API step 3: Add new selection API Jan 2, 2023
@JiuqingSong
JiuqingSong marked this pull request as ready for review January 5, 2023 21:43
@JiuqingSong
JiuqingSong merged commit a726705 into master Jan 5, 2023
@JiuqingSong
JiuqingSong deleted the u/jisong/selection3 branch January 5, 2023 23:53
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