Skip to content
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

Feature Request: Rich text embedded records #3270

Closed
einarpersson opened this issue Sep 7, 2023 · 1 comment
Closed

Feature Request: Rich text embedded records #3270

einarpersson opened this issue Sep 7, 2023 · 1 comment

Comments

@einarpersson
Copy link

einarpersson commented Sep 7, 2023

Hi!

In #3265 @ganigeorgiev mentions an upcoming feature with the possibility to embed / link to "media records" in the Rich text editor.

Would you please consider allow linking / embedding any collection type? We would love to move away from Contentful as our CMS (right now be use Contentful and Pocketbase in parallell) but this missing capability is stopping us.

An example of what we would like to do is to embed a quiz record in a Rich text field (I can come up with a dozen other applications). The UI representation of the embedded record in the editor could be as simple as possible. Clicking the embedded record could open that in a new tab. Then on the client side we would be responsible for parsing the rich text and translate each quiz type (or whatever) to respective svelte component.

I understand that you have many things on the roadmap but I hope you can see the utility of this and keep it in mind and discuss it further.

  • It would be great if an editor field also could be configured to allow only a specific subset of embedded Records. This could also include other embedded stuff such as allowing/disallowing images, videos, header-elements (h1, h2, h3...), lists etc. This would be immensely useful as the developer has more control over what it can expect on the front end.
  • Contentful rich text concept
@ganigeorgiev
Copy link
Member

The mentioned feature in #3265 is a lot more simple than what you are describing - the idea there is to create a small TinyMCE plugin that will allow users to pick record files from any collection with a non-protected file field (not the record data!) and insert the file url into the editor as img/a tag.

Another major difference between our rich editor (TinyMCE) and Contentful is that we return formatted HTML, while they seem to return a JSON response, at least as far as I understand from the linked resource.

I guess the closest thing to the above that I have some experience with is maybe WordPress shorcodes but without a builtin mechanism to parse and render those shortcodes I don't really see how embedding collection records could be actually used and it could be easier to visualize and operates with the records outside of the editor field.

For now this remains out of the scope and I'm not planning working on it but if you or someone else thinks that it can be implemented easily, feel free to comment with your ideas and I may reconsider it in the future.

Also note that while PocketBase can be used as a very rudimentary CMS, there are other platforms better suitable and focused on content management - Strapi, Directus, Statamic, etc. (eventually in the future with the Admin UI plugins this will allow users to customize it however they want but there are a lot of other stuffs that will need to be done before that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants