Comments (7)
Thanks for reporting that! Just released CKEditor 4.0.0-beta.5 with a fix.
from ckeditor.
Just released Craft 5.0.0-beta.2 and CKEditor 4.0.0-beta.6, which adds support for querying and mutating nested entries within CKEditor fields directly (craftcms/cms#14366).
So if you want to fetch nested entry data without having it pre-rendered as HTML via the partial template, you could have your partial template just include a placeholder referencing the entry ID, e.g.
<div data-craft-entry-id="{{ entry.id }}"></div>
And then fetch the nested entry data via a second GraphQL query, and do whatever you want from there.
Note that if you’re creating new nested entries via GraphQL, you will need to update the parent element’s CKEditor field value with a new <craft-entry>
tag referencing it, before it will actually show up within the field.
<craft-entry data-entry-id="123"></craft-entry>
from ckeditor.
Just realized the same thing just now. I tried changing the configs, creating new fields, with or without sub entries inside the field. Just came here to mention this in case it helps!
from ckeditor.
I take it back, I'm actually backtracking to fix the issue by downgrading the plugin one version at a time and I now realize that since v4 beta 1, it's been failing but I hadn't realized because they were released in quick successions.
--
Re-edit: Sorry for the multiple posts. Actually I just found out that I can't downgrade and nothing works anymore, CKEditor seems broken with Craft beta 1 regardless of the CKEditor beta version used. A "[]" gets returned by GraphQL regardless of what version I downgrade to.
from ckeditor.
Follow-up question @brandonkelly
The output with entry blocks looks like this:
"textEditorDefault": "<p>Quo cu eius tollit instructior.</p><p>Entry 4051</p><p>Quo cu eius tollit instructior.</p><p>Entry 4052</p><p>An populo iriure interesset sit!.</p>"
Is a children's method coming, or how does that work in the future? Just want to know if I can build on top of that or go straight with a Matrix field at the moment.
Thank you!
from ckeditor.
@davidhellmann You need to set up element partials for the entry types that you're embedding within your CKEditor fields.
https://craftcms.com/docs/5.x/system/elements.html#rendering-elements
from ckeditor.
Oh, thought that was also for twig templates. I'll have a look. Thank you!
from ckeditor.
Related Issues (20)
- Nested Entries not rendering at all on front end HOT 6
- Changes are not saved in CKEditor field while in "source" mode. HOT 1
- Unable to edit an image by double clicking on it HOT 4
- Nested entries within CKEditor fields sometimes fail to copy to other enabled sites HOT 2
- Some HTML tags not Preserved in Migration from Redactor HOT 2
- Nested Entries: invalid Entry ID in custom plugin
- Class attribute not retained with migration from Redactor HOT 2
- Cannot add inline-style tag to element HOT 1
- Twig length filter no longer returns the length of the field contents HOT 3
- Condition rules result in errors on the edit forms HOT 3
- Not able to scroll in the link site selector HOT 2
- Possible regression: Embeds Stripped Out Regardless of HTML Purifier Config HOT 3
- Would Give Firstborn Child for a JSON file Config of CKEditor Instead of CMS Configuration
- I have version 3.8.3 of the CKEditor plugin and running "php craft ckeditor/convert" returns "Unknown command: ckeditor/convert" HOT 6
- It is not possible to resize images and remove the set width and height values HOT 1
- javascript cross-origin error on entry preview with ckeditor field HOT 1
- Word Count Regex Doesn't Recognize Single Opening Quote HOT 2
- [4.x] - Nested CKEditor fields deleting content and functionality not working HOT 2
- CKEditor diverting the Link Open in a new tab, all the links back to toggle 'off HOT 1
- Documentation about DDL incorrect? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ckeditor.