Docs issue report from "framework/deep-dive/conversion/helpers/downcast.html"
Origin URL
https://ckeditor.com/docs/ckeditor5/latest/framework/deep-dive/conversion/helpers/downcast.html
Project version
41.0.0
Is the information outdated? How?
For editor users, the best way to interact with complex structures is to act as independent entities and stay intact, for instance, when copied, pasted, and edited. CKEditor 5 allows that through the widget API. If you want to learn how to use it on top of elementToStructure(), be sure to check out the Implementing a block widget tutorial.
Around the "and stay intact," For editor users, the best way to interact with complex structures is to act as independent entities and stay intact doesn't make sense. Could you mean For editor users, the best way to interact with complex structures is to make them act as independent entities that stay intact?
Is there something missing in the guide? What is it?
When doing the tutorials I could use a repo so I can see if and where the code I'm writing is wrong. I have an error in the code when I use editor.execute('highlight'); at the bottom of the https://ckeditor.com/docs/ckeditor5/latest/tutorials/crash-course/commands.html tutorial page. If I select the text Hello in the ckeditor then type this in the console. nothing is happening and its returning:
editor.execute('highlight'); undefined
Thanks. I love your doc though great work!
Is there anything else you would like to add?
No response
User agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:122.0) Gecko/20100101 Firefox/122.0
I had an error in either one of the downcast or the upcast helpers described here: https://ckeditor.com/docs/ckeditor5/latest/tutorials/crash-course/data-conversion.html#under-the-hood Never mind that.
Funny the one I typed in on the bottom did not build correctly though when I copied yours in it worked..
// Convert the input <mark> HTML element to model attribute.
editor.conversion.for('upcast').elementToAttribute({
model: 'highlight',
view: 'mark'
});
// Convert model attribute to output <mark> HTML element.
editor.conversion.for('dataDowncast').attributeToElement({
model: 'highlight',
view: 'mark'
});
// Convert model attribute to <mark> in editing view.
editor.conversion.for('editingDowncast').attributeToElement({
model: 'highlight',
view: 'mark'
});
editor.conversion.for('upcast').elementToAttribute({ model: 'highlight', view: 'mark' });
editor.conversion.for('dataDowncast').attributeToElement({ model: 'highlight', view: 'mark' });
editor.conversion.for('editingDowncast').attributeToElement({ model: 'highlight', view: 'mark' });
Funny the one I typed in on the bottom did not build correctly though when I copied yours in it worked..
What do you mean by not correctly, any errors showed?
The issue lacks the feedback we asked for two weeks. Hence, we've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.
We've closed your issue due to inactivity. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).