Skip to content
New issue

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

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

Already on GitHub? # to your account

Wrapping text into attribute causes error #3753

Closed
oskarwrobel opened this issue Jun 8, 2016 · 3 comments · Fixed by ckeditor/ckeditor5-engine#498
Closed

Wrapping text into attribute causes error #3753

oskarwrobel opened this issue Jun 8, 2016 · 3 comments · Fixed by ckeditor/ckeditor5-engine#498
Assignees
Labels
package:engine type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@oskarwrobel
Copy link
Contributor

When I was working on auto linking I had a problem with converting model nodes with link attribute to AttributeElement

BuildModelConverterFor( data.modelToView, editing.modelToView )
    .fromAttribute( 'link' )
    .toElement( ( href ) => new AttributeElement( 'a', { href } ) );

model-to-view

After changing AttributeElement to element with no attributes

BuildModelConverterFor( data.modelToView, editing.modelToView )
    .fromAttribute( 'link' )
    .toElement( 'b' );

everything looks fine (I've used b tag instead of a but it works exactly the same):
model-to-view-2

On branch ckeditor5-engine#t/475-example is a code example:
https://github.com/ckeditor/ckeditor5-engine/tree/t/475-example/src/t-475
And manual test:
https://github.com/ckeditor/ckeditor5-engine/blob/t/475-example/tests/manual/t-475.js
http://localhost:1030/build/amd/tests/engine/manual/t-475

oskarwrobel referenced this issue in ckeditor/ckeditor5-engine Jun 8, 2016
@pjasiun pjasiun self-assigned this Jun 14, 2016
@pjasiun
Copy link

pjasiun commented Jun 15, 2016

This was caused by the ugly bug in the typing feature: ckeditor/ckeditor5-typing@9c08e05 (quick fix). In fact these are two ugly bugs.

@Reinmar
Copy link
Member

Reinmar commented Jun 17, 2016

Is this on review or something?

@pjasiun
Copy link

pjasiun commented Jun 17, 2016

Nope. I was creating hackaton-independent manual test to check if the typing fixes are enough to solve this issue and I found more problems, so I keep working on it.

pjasiun referenced this issue in ckeditor/ckeditor5-engine Jun 21, 2016
@pjasiun pjasiun changed the title Converting Model to AttributeElement converts more than it should Wrapping text into attribute causes error Jun 22, 2016
szymonkups referenced this issue in ckeditor/ckeditor5-engine Feb 2, 2018
oskarwrobel referenced this issue in ckeditor/ckeditor5-engine Feb 6, 2018
Other: Manual test for #475 now works correctly. Closes #1271.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
@mlewand mlewand added this to the v0.1.0 milestone Oct 9, 2019
@mlewand mlewand added type:bug This issue reports a buggy (incorrect) behavior. package:engine labels Oct 9, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
package:engine type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants