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

[next] feat(NcRich*): migrate to vue 3 #4842

Closed
wants to merge 1 commit into from

Conversation

raimund-schluessler
Copy link
Contributor

@raimund-schluessler raimund-schluessler commented Nov 16, 2023

☑️ Resolves

  • Migrate NcRich* components to vue 3.

Todo:

  • The markdown rendering of NcRichText does not work yet and I couldn't figure out why.
  • The expected value of one test for the richEditor mixin probably needs to be adjusted.

I think a bit of help from the NcRich* component gurus would be great @juliushaertl @Antreesy

@raimund-schluessler raimund-schluessler added help wanted Extra attention is needed 2. developing Work in progress feature: rich-contenteditable Related to the rich-contenteditable components feature: richtext Related to the richtext component vue 3 Related to the vue 3 migration labels Nov 16, 2023
@raimund-schluessler raimund-schluessler added this to the 9.0.0 next Vue 3 milestone Nov 16, 2023
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Managed to make it work somehow. Please, find patch commits here:
next...feat/2154/rich-patches

@@ -146,11 +145,11 @@ export default {
document.body.appendChild(wrapper)

// Mount and get raw html
Item.$mount(mount)
Item.mount(mount)
const renderedHtml = wrapper.innerHTML
Copy link
Contributor

@Antreesy Antreesy Dec 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const renderedHtml = wrapper.innerHTML
const renderedHtml = mount.innerHTML

Thus, you won't pass an extra div wrapper, and mention-bubbles will be pasted as <span /> with display: inline
Another solution is to remove wrapper from this function completely

])
: null,
])
},
renderMarkdown(h) {
renderMarkdown() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method should be modified to parse markdown correctly

@@ -66,7 +69,7 @@ describe('richEditor.js', () => {

it('keeps mentions with user data', () => {
Copy link
Contributor

@Antreesy Antreesy Dec 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regex is outdated, maybe, because of a11y changes

@raimund-schluessler
Copy link
Contributor Author

Superseded by #4976.

@raimund-schluessler raimund-schluessler deleted the feat/2154/rich branch December 19, 2023 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress feature: rich-contenteditable Related to the rich-contenteditable components feature: richtext Related to the richtext component help wanted Extra attention is needed vue 3 Related to the vue 3 migration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants