Reputation: 249
This looks like a simple issue, but I've spent an hour trying fixing it but couldn't. In my html (Editabletext webpart), I have something like below:and Kentico automatically removed or fixed my html in all cases:
<br /> [1]
<a href=""><p></p></a> [2]
<a href=""><div></div></a> [3]
With [1] Kentico replaced br with   ; and with [2] & [3] it moved the < a > tag inside the p and div. Now, I understand my code is not following the standard in [2] & [3], but for these particular cases I wanted to link the whole div or paragraph. How to turn off this kind of auto format?
I looked under Settings > Output Filter and add "/" for all fields (I meant for root and everything under it) but it didn't take effect. Thanks!
Upvotes: 0
Views: 277
Reputation: 2209
Kentico is actually no the one changing the HTML code - CKEditor is. CkEditor is a 3rd party WYSIWYG plugin that is used by Kentico for easy content editing and writing. The philosophy of CkEditor is to always output valid HTML code and modify it if necessary. There is no simple and realible way of changing this behaviour. It may be possible to disable the ACF as mentioned here but it his highly not recommended to do.
Instead you should think whether you really want to use Editable text web part. Everytime you need to have full control over HTML you should avoid using CkEditor and use something else instead (e.g. transformation, put the code into layout etc..).
If you need this to be a web part or a widget, the only solution is to create your own widget web part with the Text area form control which you then simply output in the ASCX control. (Or you can use Content before or Content after property which every web part has :-))
Upvotes: 0