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

Rework to #1848 RawHTML not being saved #1883

Merged
merged 2 commits into from
Dec 16, 2021
Merged

Rework to #1848 RawHTML not being saved #1883

merged 2 commits into from
Dec 16, 2021

Conversation

leigh-pointer
Copy link
Contributor

Restructured the execution of code.
RawHTML now works as it did in previous versions as well as the new functionality.

Restructured the execution of code.
RawHTML now works as it did in previous versions as well as the new functionality.
Redundant procedure call.
@sbwalker sbwalker merged commit bf56c2a into oqtane:dev Dec 16, 2021
@leigh-pointer leigh-pointer deleted the RichTextContent branch December 17, 2021 06:37
@sbwalker
Copy link
Member

@leigh-pointer the RichTextEditor still has issues with these latest changes. To reproduce the problem, simply install the Oqtane.Blogs module and create a blog entry and then click the Edit button to edit the entry. The following line of code throws an unhandled exception:

        // preserve a copy of the rich text content ( Quill sanitizes content so we need to retrieve it from the editor )
        _original = await interop.GetHtml(_editorElement);

The problem is that _editorElement is null - which happens on a re-render because the logic to set the _editorElement variable is located inside the if firstrender block. I moved the logic above inside the if block (which is where it was located previously) and it resolved the problem.

My concern however is that I was never able to reproduce the original problem which your previous PR for #1837 was attempting to resolve... so I cannot determine if it resolves all scenarios.

@leigh-pointer
Copy link
Contributor Author

@sbwalker I have had a quick look and moving the code seems to continue to work with my original PR
However the Blog module references

 public override List<Resource> Resources => new List<Resource>()
    {
        new Resource { ResourceType = ResourceType.Stylesheet, Url = "css/quill/quill1.3.6.bubble.css" },
        new Resource { ResourceType = ResourceType.Stylesheet, Url = "css/quill/quill1.3.6.snow.css" }
    };

These resources were removed when Quill was updated to 1.3.7 Update Quill component to latest version #1842 and remove quill 1.3.6 assets #1866

@sbwalker
Copy link
Member

Yes I noticed that as well - renaming the CSS resources was a breaking change. The solution going forward is to rename the Quill CSS and JS files so they do not identify a specific version number.

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

Successfully merging this pull request may close these issues.

2 participants