Unless I misunderstood (your question is not very clear), it's all in the Example 3 demo. single/double click is driven by autoEdit
boolean flag. As for icon versus edit, if you want to show an icon then you use a Formatter, the editor has nothing to do with the icon (apart from the cell value that they both use). The Example has a column named "Effort Driven" which has a checkmark Formatter and the editor is a checkbox, that might look like what you're looking for. If that doesn't answer your question, then you need to edit your question and add more details (typically a good Stack Overflow question also includes the code you tried)
EDIT
As per your question update, it's not really how SlickGrid edits are working, but if you really want to make only the icon to open the editor then you can block that via the event (block anything else but the edit icon click), you can do it like this
{
id: 'CspfmData',
name: 'Institure',
field: 'CspfmData',
minWidth: 70,
filterable: true,
sortable: true,
type: FieldType.string,
editor: {
model: Editors.longText,
validator: CspfmDataValidator,
},
formatter: (row, cell, val) => {
return val ? `${val} <span class="fa fa-pencil" style="padding: 2px; border: 1px solid #e0e0e0"></span>` : '';
},
onCellClick: (event) => {
// cancel click event when it's not the edit icon
if (!(event.target as HTMLSpanElement).classList.contains('fa-pencil')) {
event.stopImmediatePropagation();
}
}
}
Personally I don't think it's a good idea though, I never really put an icon inside the cell because it takes extra space which we typically don't have, but if it's really how you want it then that solution should work.
A better approach which we use on our side is to format the cell that are editable, so we add an extra Formatter to display editable cell with a different css styling and that has the advantage to not take any space at all, you can see a demo on Example 30 the cells with blue background are editable (in our project we have a simple gray outline on the editable cells). This is a better approach since it doesn't take any space