In CKEditor, when I use a block quote in the toolbar, it will look like
<blockquote> <p></p> </blockquote>
How to remove the <p></p> in a block quote?
<p></p>
Or how to replace <p></p> with <pre></pre> ?
<pre></pre>
CKEDITOR.on( 'instanceReady', function( ev ) { var editor = ev.editor; var dataProcessor = editor.dataProcessor, htmlFilter = dataProcessor && dataProcessor.htmlFilter; htmlFilter.addRules( { elements: { $: function (element) { var parent = element.parent; if (element.name == 'p') { if (parent && parent.name.toLowerCase()=='blockquote') { element.name="pre"; } } return element; } } }); });
https://jsfiddle.net/z6y8q6rm/4/
Source: https://habr.com/ru/post/1202766/More articles:Excel XY plot (scatter plot) Data label No overlap - vbaApplicator Titanium - Alloy vs Classic - titaniumWhy is there no mapM for turnip arrays? - haskelltypescript: a dot notation access property using a dictionary type - typescriptExcel VBA WorksheetFunction.CountA - does not work after upgrading to Office 2010 - worksheet-functiondynamic filtering with input_select () using ggvis in R - dynamicVBA overflow error after upgrading from 2007 to 2010 - vbaOverflow Error 6 with the following Excel 2010 VBA - vbakeyboard hides action bar when using adjustPan - androidQuickly change text color using NSMutableAttributedStrings - iosAll Articles