ContentTools icon indicating copy to clipboard operation
ContentTools copied to clipboard

How to apply style tag in properties window?

Open harshitaparmar opened this issue 7 years ago • 2 comments

harshitaparmar avatar Oct 23 '18 08:10 harshitaparmar

Hi @harshitaparmar,

Here's an example taken from a recent project:

// Add custom class styles for the site
ContentTools.StylePalette.add([
    new ContentTools.Style(
        'Highlight - Apply a highlight tag to bold content',
        'highlight',
        ['h1', 'h2', 'h3', 'li', 'p']
    ),
    new ContentTools.Style(
        'Large text - Increase font size',
        'large-text',
        ['p']
    ),
    new ContentTools.Style(
        'Margin - Increase paragraph spacing',
        'large-spacing',
        ['p']
    ),
    new ContentTools.Style(
        'Table - Alternative table style',
        'table--alternative',
        ['table']
    ),
    new ContentTools.Style('Image caption', 'image-caption', ['p'])
])

anthonyjb avatar Oct 24 '18 17:10 anthonyjb

@harshitaparmar I'm hoping the above is what you're asking about - if I've misunderstood can provide a slightly more detailed question please.

anthonyjb avatar Oct 24 '18 17:10 anthonyjb