Issue #1998πŸ’¬ AnsweredOpened May 3, 2019by VM81980 reactions

Extending Link component not working properly.

Quick answerby lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read full answer below ↓

Question

hello @hello @artf I am trying to extend the link component and add new traits like href and target the code is given below. `function loadWithOption(opts) { editor.DomComponents.addType('link', { model: dModel.extend({ defaults: Object.assign({}, dModel.prototype.defaults, { traits: [ // strings are automatically converted to text types // title, { type: 'text', label: 'text', name: 'text', }, { type: 'select', label: 'Target', name: 'target', options: [ { value: '', name: 'This window' }, { value: '_blank', name: 'New window' }, ] }, { type: 'select', label: 'Href', name: 'href', options: [...

Answers (1)

lock[bot]β€’ May 6, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.