Skip to content

nbsp button (code included) #1325

@liedekef

Description

@liedekef

Simple code to add a nbsp button:

    Jodit.modules.Icon.set('insertNbsp', '<svg viewBox="0 0 100 40" width="20" height="20" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="96" height="36" rx="6" ry="6" fill="#f0f0f0" stroke="#333" stroke-width="3"/></svg>');

    Jodit.defaultOptions.controls.insertNbsp = {
        icon: 'insertNbsp',
        tooltip: 'Insert nbsp',
        exec: (editor) => editor.selection.insertHTML('&nbsp;'),
    };

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions