Skip to content

Conversation

@flyingbee2012
Copy link
Owner

No description provided.

juliaroldi and others added 30 commits March 6, 2023 16:51
…icrosoft#1614)

* Add delimiters on EditorReady and Paste

* Handle ContentChanged Event

* Add a unit test

* Fix

* Fix build
* Reuse Content Model

* fix test

* fix test

* add comment

* improve

* improve

* Improve

* fix test

* improve
When pressing Enter on a delimiter, usually when the entity is at the end of the block or is the only element in the block, sometimes the delimiter element is moved away from the Entity or the element after Enter also contains the Delimiter class. This PR adds functionality to prevent this from happening.

Before
![DelimiterEnterBefore](https://user-images.githubusercontent.com/8291124/223553792-8b236323-9ca9-4393-8c5e-63c9043fc040.gif)

After
![DelimiterEnterAfter](https://user-images.githubusercontent.com/8291124/223554716-0dedd8e7-d035-43fc-9639-ebc7a570007c.gif)
* Content Model: Fix fidelity issue of list

* fix demo
* Content Model: Fix format change while editing

* add test
The Content Edit was not working when cursor was between Entities, this PR fixes it,

To Repro add multiple Readonly inline entities together. Without this change we had to use Arrow Key twice, now we only need to press it once
mprove the Content Edit Feature to delete delimiters.
If After the Content Edit was handled:

If the Entity still exists, add the delimiter removed.
If the entity was removed in the ContentChanged Event, remove the Delimiters.
If the event was not default prevented, select the delimiters and entity and let the browser handle the deletion.
Also, in EntityPlugin if the known entity removed is a inline entity, normalize delimiters
Handle a scenario where the delimiter is removed when user selects the text + delimiter.

Repro

Add Entity
type Next and Before the Entity
Select the text after/before the entity
press a key the modified the content
Actual:
The delimiter is removed in some scenarios

Expected:
Do not remove the delimiter

To fix modify the selection and prevent the user typing inside of the delimiter when selection is not collapsed
…oft#1632

I was only checking if the element was a delimiter, but also need to check that the classes are correct,
Otherwise, if the next sibling of the entity that we are adding the delimiters is a delimiterBefore of another entity, we won't add the delimiter after.
…sues

Remove max-width from insertImageWithSrc
…ent Model (microsoft#1641)

* Add a parameter to enable/disable handling keyboard editing from Content Model

* fix test
Andres-CT98 and others added 30 commits June 8, 2023 14:41
* fix inserter

* fix comment

* changed to enum
* Import Helpers

* add tslib dependency

---------

Co-authored-by: Bryan Valverde U <[email protected]>
microsoft#1870)

* Content Model: Let browser handle delete/backspace event for normal cases

* clear cache if let browser handle delete event

* fix test

---------

Co-authored-by: Bryan Valverde U <[email protected]>
* Patch for microsoft#1870

* Use Content handle Ctrl+Backspace

* improve
* init

* add test

* fix build

* fix in firefox
* Add back onExternalContentTransform

* fix test
* Content Model: Ignore empty paragraph when turn on list

* Improve

* Improve

---------

Co-authored-by: Bryan Valverde U <[email protected]>
* Content Model: Fix header level issue

* fix test
Co-authored-by: Bryan Valverde U <[email protected]>
* Fix #209223

* fix build and test
…le-background-color

Handle dark colors for table background color
Co-authored-by: Bryan Valverde U <[email protected]>
* init

* add new type to ContentModelTableFormat

* add renderer to demo and export in index
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.

10 participants