Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
RT.split(VALUE, 'foo');
RT.split(VALUE, 5);
RT.split(VALUE, 'foo', 10);
RT.split(VALUE, 5, 10);
RT.split(VALUE, undefined, 5);
//
// toHTMLString
//
RT.toHTMLString({ value: VALUE });
RT.toHTMLString({ value: VALUE, multilineTag: 'p' });
//
// toggleFormat
//
RT.toggleFormat(VALUE, FORMAT);
//
// unregisterFormatType
//
RT.unregisterFormatType('foo');
//
// store
//
dispatch('core/rich-text').addFormatTypes({
className: null,
edit: () => null,
name: 'my/foo',
tagName: 'a',
title: 'foo',
});
const onToggle = () => onChange( toggleFormat( value, { type: name } ) );
const onToggle = () => {
onChange(
toggleFormat( value, {
type: name,
attributes: {
style: 'text-decoration: underline;',
},
} ) );
};
const onToggle = () => onChange( toggleFormat( value, { type: name } ) );
const onToggle = () => onChange( toggleFormat( value, { type: name } ) );
const onToggle = () => onChange( toggleFormat( value, { type: name } ) );
const onToggle = () =>
onChange(
toggleFormat( value, {
type: 'wpcom/underline',
attributes: {
style: 'text-decoration: underline;',
},
} )
);
const onToggle = () => onChange( toggleFormat( value, { type: name } ) );