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

RTE Property in custom backoffice view #15474

Closed
AndersBrohus opened this issue Dec 18, 2023 · 7 comments
Closed

RTE Property in custom backoffice view #15474

AndersBrohus opened this issue Dec 18, 2023 · 7 comments

Comments

@AndersBrohus
Copy link
Contributor

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

13.0.1

Bug summary

Hi,
We are upgrading an Umbraco 10 website to Umbraco 13 - We are facing some issues with the updated RTE, and only the RTE field.

The config for the RTE is the following,

thankYouText = {
    alias: 'thankYouText',
    editor: 'Umbraco.TinyMCE',
    label: 'Thank you text',
    hideLabel: false,
    description: '',
    view: 'rte',
    value: vm.model.data.thankYouText,
}

But we are getting an error in the console, Could not find umbVariantContent in the $scope chain

How should we "inject" this into our custom backoffice view?

Specifics

No response

Steps to reproduce

Try to upgrade a website with a custom backoffice view which contains an RTE

Expected result / actual result

A working RTE

Copy link

Hi there @AndersBrohus!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

  • We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
  • If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
  • We'll replicate the issue to ensure that the problem is as described.
  • We'll decide whether the behavior is an issue or if the behavior is intended.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@nielslyngsoe
Copy link
Member

nielslyngsoe commented Jan 5, 2024

Hi @AndersBrohus

Thanks for reporting this issue, I see the problem and I understand why you still want to be able to do this.

The problem originates in the implementation of Blocks, as the editing of Blocks works as a sub editor, giving us more requirements for the implementation of the Rich Text Editor.

That though does not make your use case less valuable, so sorry for the inconvenience.

I think your description is good, but it does not clarify enough for me to verify if this idea could be a solution to the problem, so please help me verify your needs:

I will suggest that we lower the implementation requirements, to what was required before. With the down side of Blocks not being supported when only the minimal implementation is provided. In other words, you will be able to use the Rich Text Editor in your custom view again. But not insert Blocks into that Rich Text Editor.

The background for such begin that I think it would be a tough job for you to implement the new requirements correctly.

How does that sound?

Also, on a side note, and of personal interest. Could you describe a bit more of the use case of your custom view. What it is and what its used for.

Thanks in return

@nielslyngsoe nielslyngsoe self-assigned this Jan 5, 2024
@AndersBrohus
Copy link
Contributor Author

Hi @nielslyngsoe

That sounds like a great idea :)
We are interested in a simple TinyMCE for the editor to create an HTML string :)

On this specific case, we have a custom section where you can edit data from a custom database, but in a Umbraco like experience, this data has nothing to do with Umbraco, but is a part of the website :)

@abjerner
Copy link
Contributor

abjerner commented Jan 8, 2024

Just for reference, this also affects my Tables package, so for now I'm unable to update the package to target Umbraco 13.

Unless I've missed Umbraco declaring this a breaking change for Umbraco 13, I'm seeing this a regression issue because umbVariantContent is now required in order to use the build-in RTE property editor in custom views.

Updating the build-in RTE property editor to not require umbVariantContent, but then not support nested blocks if umbVariantContent isn't available, will be an acceptable solution in my case 👍

@leekelleher
Copy link
Member

FYI (for the context in this discussion), I hit the same issue with Contentment (using the RTE in the data-type configuration, for the Notes editor). But because I didn't catch it early enough, Umbraco 13 had already been released so I ended up rolling my own custom RTE; ref: leekelleher/umbraco-contentment@c4926c2#diff-fd57691c707aae91e655d7b48b4c937f4341a51c3e8bb619bc283172b4500893

@Zeegaan
Copy link
Member

Zeegaan commented Jan 10, 2024

Fixed in #15556 🚀

@Zeegaan Zeegaan closed this as completed Jan 10, 2024
@marcemarc
Copy link
Contributor

Thanking all! - this just saved the day! - in terms of use case, on this site being migrated to v13, the editing experience is extended beyond that of updating content on the website, to contain custom dashboards to manage content change requests made on the front end by members of the association, so the implementation uses an RTE to show the HTML changes requested and enable the site administrator to tweak the HTML and then Approve / Reject changes

image

This was all built in the V7 days before Plumber and Umbraco UI Builder.

It doesn't need to be the same implementation as the backoffice RTE, (particularly as this evolves) but it really helps extend Umbraco if there are a bunch of common components you can just use without faff to build up your dashboards and sections.

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

No branches or pull requests

7 participants