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

WebComponents / Dropdown menu issue #2477

Closed
lukaszkaleta opened this issue Apr 27, 2022 · 4 comments
Closed

WebComponents / Dropdown menu issue #2477

lukaszkaleta opened this issue Apr 27, 2022 · 4 comments
Labels

Comments

@lukaszkaleta
Copy link

Version

latest @toast-ui/editor

Test Environment

ANY browser, Linux

Current Behavior

When trying tui.editor inside WebComponent (Lit) I have issue with all dropdowns like Heading, Table.
When clicking on dorpdawn nothing happens and it is not possible to add heading.

import {css, html, LitElement} from 'lit'

import Editor from '@toast-ui/editor';
import {iMarkdownEditorStyles} from 'shared/component/markdown/i-markdown-editor-styles.js'

export class IMarkdownEditor extends LitElement {

    constructor() {
        super()
    }

    static properties = {
        value: {type: String}
    }

    static styles = [
        iMarkdownEditorStyles
    ]

    firstUpdated(_changedProperties) {
        const editor = new Editor({
            el: this.renderRoot.querySelector('#editor'),
            previewStyle: 'vertical',
            height: '500px',
            initialValue: 'Test',
            initialEditType: 'wysiwyg',
            language: 'nb',
            toolbarItems: [
                ['heading', 'bold', 'italic', 'strike'],
                ['hr', 'quote'],
                ['ul', 'ol', 'task', 'indent', 'outdent']
            ],
            frontMatter: true,
        });
    }

    render() {
        return html`<div id="editor"></div>`
    }
}

customElements.define('i-markdown-editor', IMarkdownEditor)

chrome-capture-2022-3-27

@jwlee1108
Copy link
Contributor

@lukaszkaleta
Sorry for the late reply. I don't have experience with WebComponent (LitElement). First of all, I'll figure out the issue. sorry.

@stale
Copy link

stale bot commented Jul 31, 2022

This issue has been automatically marked as inactive because there hasn’t been much going on it lately. It is going to be closed after 7 days. Thanks!

@stale stale bot added the inactive label Jul 31, 2022
@stale
Copy link

stale bot commented Nov 12, 2022

This issue will be closed due to inactivity. Thanks for your contribution!

@stale stale bot closed this as completed Nov 12, 2022
jpradelle added a commit to jpradelle/tui.editor that referenced this issue Dec 19, 2022
…itor is used in a WebComponent shadowRoot
jpradelle added a commit to jpradelle/tui.editor that referenced this issue Dec 19, 2022
…Dom (fix nhn#2477)

Fix dropdown menu closing when clicking on menu item when editor is used in a WebComponent shadowDom
@thomas-darling
Copy link

This is still broken - please reopen

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

No branches or pull requests

3 participants