Border Width Properties
Question
Is it possible to add border-top, border-right,border-left properties individually under the decoration heading in grapesjs. This would be similar to border radius.
For now it only shows the border-width which gives all sided borders. I want only right or left sided borders.
Answers (3)
Hi @NorthstarTech,
I don't have a code example, but have you looked at https://github.com/artf/grapesjs/wiki/API-Style-Manager#addproperty? There's an example there that adds "min-height" - could you modify that example to fit your needs and report back with your code if you run into trouble?
@NorthstarTech Example for the right border
editor.StyleManager.addProperty('Decorations', {
name: 'Border right',
property: 'border-right',
type: 'composite',
properties: [{
name: 'Width',
type: 'integer',
units: ['px', 'em', 'rem'],
property: 'border-right-width',
},{
name: 'Style',
type: 'select',
property: 'border-right-style',
options: [
{value: 'none'},
{value: 'solid'},
{value: 'dotted'},
{value: 'dashed'},
{value: 'double'},
{value: 'groove'},
{value: 'ridge'},
{value: 'inset'},
{value: 'outset'}
]
}, {
name: 'Color',
type: 'color',
property: 'border-right-color',
}]
});
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.
Issue #1623
Same Design for all blocks
Hi @artf , this is not actually a bug but I would like to ask if there is something like global design for every blocks. for example all im...
Issue #1750
[Question] Show drawing outlines only under actively editing blocks
Is it possible to show show drawing outlines only for the currently selected (with all children) and for the hovered elements? Thus all oth...
Issue #923
[Question]: Add a select-option to toolbar
I have read the code and only I could find out that there is only a list of ToolbarButton associated with the toolbar. I have a special tra...
Issue #1733
How to remove script tag which is added by add block manager script
Hello @artf I want to export final/production based html content excluding the script(Only which is added by block manager). Suppose i am a...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.