Canvasbird / canvasboard

An interactive board with plugins focusing on replacing the need of multiple platforms for teaching, presenting, managing or explaining your ideas.
MIT License
199 stars 120 forks source link

Link verification #471

Closed goliakshay357 closed 2 years ago

goliakshay357 commented 2 years ago

Is your feature request related to a problem? Please describe. A link verification function before attaching the links to the embed plugin/youtube plugin

patrikhv commented 2 years ago

Hi, can you describe this issue more? I am interested in it.

goliakshay357 commented 2 years ago

Hello @patrikhv, When you paste a link in the embed plugin or youtube plugin. Verification/Validation of the link shud be taken care.

Steps:

  1. User pastes the link in the input field
  2. When clicked on "ENTER", validate the link.
  3. if correct, move forward
  4. if wrong due to some reason, log the error

Eg: image

patrikhv commented 2 years ago

Thanks. Where is this component located?

goliakshay357 commented 2 years ago

For Embed Plugin: https://github.com/Canvasbird/canvasboard/blob/f3f95fcb431d0dacab6f443279e8bfe9c2bc4231/src/app/components/new-board/new-board.component.html#L894

You can add the click function in .ts file and then make the logic for verification.

For Youtube Plugin: https://github.com/Canvasbird/canvasboard/blob/f3f95fcb431d0dacab6f443279e8bfe9c2bc4231/src/app/components/new-board/new-board.component.html#L968 The function is already there in the .ts file. So you can just add the verification function here

Aniket-508 commented 2 years ago

Can we just use input type as url instead of text for embed link and write a simple custom regex for youtube validation? @goliakshay357

goliakshay357 commented 2 years ago

Good point.