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

Need to add a custom Add video button and retain the existing embed link #955

Open
akash1201 opened this issue Mar 9, 2024 · 0 comments

Comments

@akash1201
Copy link

akash1201 commented Mar 9, 2024

Here is my code snippet with custom upload a video button.

  Now when I try to retain the existing embed video button like this 
  
 `  <div id="toolbar" style={{ borderBottom: "none" }}>
    <select className="ql-header" defaultValue="" onChange={e => e.persist()}>
      <option value="1">Heading 1</option>
      <option value="2">Heading 2</option>
      <option value="3">Heading 3</option>
      <option value="4">Heading 4</option>
      <option value="" selected>
        Normal
      </option>
    </select>
    <button className="ql-bold"></button>
    <button className="ql-italic"></button>
    <button className="ql-underline"></button>
    <button className="ql-strike"></button>
    <button className="ql-blockquote"></button>
    <button className="ql-list" value="ordered"></button>
    <button className="ql-list" value="bullet"></button>
    <button className="ql-indent" value="-1"></button>
    <button className="ql-indent" value="+1"></button>
    <button className="ql-indent" value="+2"></button>
    <button className="ql-link"></button>
    <button className="ql-image"></button>
    <button className="ql-code-block"></button>
    <button className="ql-clean"></button>
   <button className="ql-video"></button> 
    {videoButton ? videoButton : <></>}
  </div>
  <ReactQuill
    theme="snow"
    value={value}
    style={props.style}
    onChange={onChange}
    modules={videoButton ? isMobile  ? mobileModules : { ...modules, toolbar: '#toolbar' } : isMobile  ? mobileModules : modules}
    // modules={modules}
    className={className}
    placeholder={placeholder}
    ref={editorRef}
  />

`

The option is retained, but the problem here is when I click on the embed video button it triggers the uplaod file popup which is the custom video button feature.

Is there any way to achieve it?

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

No branches or pull requests

1 participant