Coder Social home page Coder Social logo

Comments (5)

bastianallgeier avatar bastianallgeier commented on August 25, 2024

KQL uses an allow-list for objects and methods that can be queried and executed. Blocks are not included. We will very likely not support the editor blocks, but the blocks of our upcoming blocks field. The editor is going to be replace by that eventually.

from kql.

renestalder avatar renestalder commented on August 25, 2024

Ah, I see. I was of the impression the editor plugin might be moved to the core as is. Thanks for the hint.

But for clarification, when I understand you correctly, even when I go and install 3.5's release candidate and use the those included block fields, I might still not be able to get those via kql in HTML; this is not implemented yet in kql, is this correct?

So, just for your understanding: Now I'm probably going to build 2 or 3 websites per month on Kirby, all decoupled (headless), which currently is only reliably possible thanks to the kql plugin (the only solution dealing with KirbyText built-in) without additional effort of writing a client-side KirbyText parser. For me, it's still a bit to figure out which headless features or plugins in Kirby are the most robust in the long term.

from kql.

igregson avatar igregson commented on August 25, 2024

This sounds similar to what I described in #15. The underlying question seems to be whether KQL should return serialized HTML or raw JSON. I can see valid reasons to want either (even both). Perhaps having the option to return either/both is the preferable approach here?

from kql.

renestalder avatar renestalder commented on August 25, 2024

That kind of seems out of question to me, as there is parsing logic for blocks in the PHP library. And as kql basically seems to make use of that existing logic in other cases (either directly or by "faking it", I don't know, I didn't look at the code) for every query, it's only logical that this behaviour of the blocks will be available in kql. It would also be inconsistent to have those functions for parsing KirbyText, Arrays, YAML, JSON, Structure fields and so on, but then not for blocks.

For me, the remaining question is rather: When is it going to be available?

(btw. speaking of the editor plugin, you're able to return the JSON by now. But as said, using the blocks function in the kql query seems to return the ids only instead of parsing the whole JSON object)

from kql.

renestalder avatar renestalder commented on August 25, 2024

Closing in favour of #20 which addresses the question for the new 3.5.0 blocks and layouts, where I referenced this possibility for the earlier Editor plugin.

from kql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.