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

[rich-text-editor] Externalize the toolbar #1690

Open
heruan opened this issue Mar 15, 2019 · 4 comments
Open

[rich-text-editor] Externalize the toolbar #1690

heruan opened this issue Mar 15, 2019 · 4 comments
Labels
Projects

Comments

@heruan
Copy link
Member

heruan commented Mar 15, 2019

Would it be possible to externalize the toolbar, i.e. make it a separate component? This would let a developer to:

  • use its own toolbar (or no toolbar at all)
  • place the toolbar elsewhere in the page layout, e.g.
<dom-module id="my-custom-layout">
  <template>
    <div part="toolbar-container">
        <vaadin-rich-text-toolbar></vaadin-rich-text-toolbar>
    </div>
    <div part="editor-container">
        <vaadin-rich-text-editor></vaadin-rich-text-editor>
    </div>
  </template>
</dom-module>

This would be particularly useful e.g. to have the toolbar in a location of the page that is always visible when editing long content that scrolls.

@web-padawan
Copy link
Member

Should be possible, but might turn out more complex than it seems.

  1. Some toolbar buttons are managed by Quill, but "undo" and "redo" have their own listeners
  2. There are special tricks to make focus work properly between toolbar and editor content
  3. There are other tricks to ensure "change" event does not fire when focusing toolbar

@heruan
Copy link
Member Author

heruan commented Mar 28, 2019

Thank you @web-padawan for the insights! I'm aware this isn't simple, since I've tried hard to do this myself and failed miserably 😅 But I think it would be very useful, e.g. in a Wiki-like app.

@QNENet
Copy link

QNENet commented Jul 13, 2019

The "Enter an Image URL:" dialog when the image key selected in the rich text toolbar is very unfriendly for users, in fact, for my users of no value.

A user needs to access images from the file system or in mobile case a recent photo for example.

If we had access to the image button we could handle custom cases with a click listener, although I do not know if enough access is available to the toolbar code to do anything anyway with a click listener.

I would like to use richtext for creating emails and chat messages containing images.

@heruan
Copy link
Member Author

heruan commented Sep 30, 2019

Any plan for this?

@vaadin-bot vaadin-bot transferred this issue from vaadin/vaadin-rich-text-editor May 19, 2021
@web-padawan web-padawan changed the title Externalize the toolbar [rich-text-editor] Externalize the toolbar May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
vaadin-core
  
📬  Inbox
Development

No branches or pull requests

4 participants