-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Can't type after 'isObject' entity at the end of the paragraph or before <br> #1426
Comments
What does your conversion to the view look like? What does |
Inline object elements are not much supported as of now -- we haven't took time yet to research this and fix all the things that are not clicking there as there were other priorities. We look forward to fix those issues but AFAIK this is not on our short term timeline ATM (I might be wrong, though). |
@jodator isn't this fixed in one of your PRs? |
Looks like the issue should be fixed after closing all PRs of: ckeditor/ckeditor5-widget#70. Basically it boils down to #1049. The only change would be to mark editor.model.schema.register( 'myTag', {
allowWhere: '$text',
allowContentOf: '$block',
allowIn: '$text',
allowAttributes: [ 'myTag', 'title', 'value' ],
isObject: true,
isInline: true // <- this will mark it as a text-like element
} ); I didn't check how the inserting contents will work inside |
Feature: Introduced support for inline objects (enables support for inline widgets). Introduced `Schema#isInline()`. Closes [ckeditor/ckeditor5#1049](ckeditor/ckeditor5#1049). Closes [ckeditor/ckeditor5#1426](ckeditor/ckeditor5#1426).
🐞 Bug report
💻 Version of CKEditor
Used versions:
"@ckeditor/ckeditor5-core": "~11.1.0", "@ckeditor/ckeditor5-ui": "~11.2.0", "@ckeditor/ckeditor5-react": "~1.1.0", "@ckeditor/ckeditor5-dev-utils": "~11.0.1", "@ckeditor/ckeditor5-utils": "~11.1.0", "@ckeditor/ckeditor5-basic-styles": "~10.1.0", "@ckeditor/ckeditor5-theme-lark": "~12.0.0", "@ckeditor/ckeditor5-editor-classic": "~11.0.2", "@ckeditor/ckeditor5-alignment": "~10.0.4", "@ckeditor/ckeditor5-essentials": "~10.1.3", "@ckeditor/ckeditor5-heading": "~10.1.1", "@ckeditor/ckeditor5-link": "~10.1.0", "@ckeditor/ckeditor5-paragraph": "~10.0.4",
Editor initializations:
📋 Steps to reproduce
Register a new type of block, which is object and can be used into paragraph.
editor.model.schema.register('myTag', {
allowWhere: '$text',
allowContentOf: '$block',
allowIn: '$text',
allowAttributes: ['tag', 'title', 'value'],
isObject: true,
});
Pass sample text into editor:
<p><myTag>xyz<myTag></p>
<p>Test text <myTag>xyz<myTag></p>
<p>Test text <myTag>xyz<myTag> test text test text</p>
<p><myTag>xyz<myTag><br>xyz</p>
It means:
<p>
<p>
, prepended by text<p>
, prepended and appended by text<br>
tag is the next of Object.✅ Expected result
I can type after objectTag and data:change will fired.
❎ Actual result
I can type only in cases 1 and 3, In cases 2 and 4 - i can't.
📃 Other details that might be useful
I suppose, it's closely connected with this issue: #407
The text was updated successfully, but these errors were encountered: