The allowedContent configuration option in CKEditor is used to define what HTML elements and attributes are allowed to be used in the editor's content. This feature helps maintain consistent and safe content creation by restricting the types of elements and attributes that users can add to the editor. "a[!href,*]"lets you enable link button in toolbar.
Source code viewer
CKEDITOR.plugins.add( 'simplebox', { requires: 'widget', init: function( editor ) { editor.widgets.add( 'simplebox', { template: '<div class="simplebox">' + '<h2 class="simplebox-title">Title</h2>' + '<div class="simplebox-content"><p>Content...</p></div>' + '</div>', editables: { title: { selector: '.simplebox-title', // Enable link button. allowedContent: 'a[!href, *]', }, }, upcast: function( element ) { return element.name == 'div' && element.hasClass( 'simplebox' ); } } ); } } );Programming Language: Javascript