The link titles are not editable
Thanks for the report, will be fixed in the next release.
Read full answer below ↓Question
GrapesJS version
- I confirm to use the latest version of GrapesJS
What browser are you using?
Chrome v122, Safari 17
Reproducible demo link
https://grapesjs.com/demo.html
Describe the bug
How to reproduce the bug?
- Add link component, try editing the link text
What is the expected behavior? The link text should be editable
What is the current behavior?
Code of Conduct
- I agree to follow this project's Code of Conduct
Answers (3)
Thanks for the report, will be fixed in the next release.
I have the same issue recently.
The issue you're encountering, where link titles are not editable, likely stems from a common misunderstanding of how GrapesJS handles different parts of a link component, specifically the distinction between the link's visible text and its HTML title attribute.
Let's clarify and provide solutions for both scenarios:
1. Editing the Link's Visible Text (Inner HTML)
What it is: This refers to the text displayed inside the <a> tag, for example, Click Here in <a href="#">Click Here</a>.
Expected Behavior in GrapesJS: By default, the visible text of a link component is inline editable. You should be able to click on the link in the canvas and then click again (or double-click) to enter text editing mode, similar to editing a standard text block.
How to Edit:
- Drag a "Link" component from the "Basic" blocks into your canvas.
- Click once on the link component to select it.
- Click a second time (or double-click) on the link text itself. This should activate the rich text editor (ProseMirror) allowing you to type and change the text.
Troubleshooting if Link Text is NOT Editable: If you cannot edit the link's visible text, it's usually due to one of these reasons:
-
Custom Component Definition: If you have a custom
linkcomponent or a block that generates a link, it might haveeditable: falseexplicitly set. Ensure your component definition allows editing.editor.DomComponents.addType('custom-link', { model: { defaults: { tagName: 'a', // Ensure 'editable' is true for the content to be editable editable: true, traits: [ 'href', 'title', // Add title trait here if you want it { type: 'select', label: 'Target', name: 'target', options: [ { value: '_self', name: 'Same window' }, { value: '_blank', name: 'New window' } ] } ], // Default content if not provided content: 'Edit Link Text' } } }); editor.BlockManager.add('custom-link-block', { label: 'Custom Link', category: 'Basic', content: { type: 'custom-link' } }); -
CSS Overlays: Less common, but sometimes custom CSS might apply
pointer-events: none;or similar properties that prevent interaction with the link element in the editor.
2. Editing the Link's HTML title Attribute
What it is: This refers to the title attribute of the <a> tag (e.g., <a href="#" title="This is a tooltip">Link</a>). This attribute is typically used for tooltips that appear when a user hovers over the link.
Expected Behavior in GrapesJS: The title attribute is not inline editable. In GrapesJS, HTML attributes are managed via the Traits panel.
Root Cause of Your Issue: The default GrapesJS link component does not include a title trait by default. This is why you cannot find a way to edit it.
Solution: Add a title Trait to the Link Component
You need to extend the default link component type to include a title trait. This will make the title attribute editable via the Traits panel.
const editor = grapesjs.init({
// ... your GrapesJS configuration
});
editor.on('load', () => {
const dc = editor.DomComponents;
// Get the default 'link' component type
const linkType = dc.getType('link');
// Extend the 'link' component model
dc.addType('link', {
model: {
defaults: {
// Merge existing traits and add the new 'title' trait
...linkType.model.prototype.defaults,
traits: [
...linkType.model.prototype.defaults.traits,
{
type: 'text',
label: 'Title',
name: 'title',
placeholder: 'Tooltip text'
}
]
}
}
});
// Re-add the default 'link' block to ensure it uses the updated component type
// This step might be necessary if blocks are defined before component types are extended
const bm = editor.BlockManager;
const defaultLinkBlock = bm.get('link');
if (defaultLinkBlock) {
bm.remove('link');
bm.add('link', {
label: defaultLinkBlock.get('label'),
category: defaultLinkBlock.get('category'),
content: { type: 'link', content: 'Link' }, // Ensure it uses the updated 'link' type
activate: true,
select: true,
});
}
});
How to Edit the title Attribute (after adding the trait):
- Drag a "Link" component into your canvas.
- Select the link component by clicking on it.
- Look at the Traits panel (usually on the right sidebar). You should now see a new input field labeled "Title".
- Enter your desired tooltip text into this "Title" field. This will update the
titleattribute of your link.
By implementing the code snippet above, you will enable the editing of the title attribute through the GrapesJS Traits panel, resolving the core of your issue.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #6152
CSS added via custom code persists after custom code component is removed
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? any Reproducible demo link https://grapesj...
Issue #5378
Uncaught TypeError: Cannot read properties of undefined (reading 'Canvas') while dragging a component in Layer Manager Panel
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v116.0.5845.97 Reproducible demo li...
Issue #4257
Background modification doesn't work for non-images
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v100 Reproducible demo link https:/...
Issue #4000
Pasting a component in root body layer throws TypeError
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v89 Reproducible demo link https://...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →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.
Tutorial
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins — TinyMCE Inline Text Editor and Placeholder.
Tutorial
Find the Right GrapesJS Plugin in Seconds: Smarter Discovery Is Live
We're shipping a set of discovery upgrades. New label filters, a proper compatibility switch for GrapesJS vs Studio, one-click and a smarter sort bar.
Tutorial
GrapesJS vs Webflow vs Tilda: What to Choose for Your Business in 2026
Choosing the right website platform in 2026 is no longer just about building a site
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.