Can I Force CKEditor To Make The First Line An H1? -


can force ckeditor make first line h1 default? then, after hitting enter, want else "normal" default.

the reason seamlessly generate title without requiring separate title field.

ckeditor screenshot

no, it's (probably) impossible. because you'd need hack selection, block commands except h1 format , on. you'd spend lot of time result hacky , unstable, totally not worth effort. simply, not ckeditor has been made for.

the fastest way implement separate field in form (<input>) or, if want have rich editing features (like links or colors in <h1>), create inline editor instance out of <h1> like

<h1 contenteditable="true" id="title">title</h1>  ckeditor.inline( 'title', { ...config } ); 

and collect value using ckeditor.instances.title.getdata(). there's editor#change event, might helpful if decide synchronise inline editor hidden field in form.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -