Border Width Properties
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.
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.