0

I would like to modify the horizontalrule plugin of ckeditor:

...
exec: function( editor ) {
        var hr = editor.document.createElement( 'hr' );
        editor.insertElement( hr );
    },

    allowedContent: 'hr',
    requiredContent: 'hr'
};
...

This plugin generates:

<hr />

But I would like to get sg. like:

<hr style="color:#FFF; height:2px;" />

Can anyone help me out how to achieve this?

0

1 Answer 1

1
hr.style.color = "#FFF";
hr.style.height = "2px";

You can do this to the hr variable at pretty much any time.

Sign up to request clarification or add additional context in comments.

1 Comment

i tried this allready but it is not working. it seems to be a specific problem with ckeditor

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.