How to configure CKEditor to allow html block-level tags to be wrapped in an anchor tag

后端 未结 2 565
清酒与你
清酒与你 2021-01-06 05:58

I would like to wrap a few block tags in a link (valid in HTML5):


  
foo

bar

相关标签:
2条回答
  • 2021-01-06 06:42

    At the moment CKEditor (4.2) is xHTML/HTML4 editor only. There's no support support for HTML5 DTD (which is dynamic, BTW) and this is the root of your problem. I'm also afraid there's no workaround/config since different DTD means different parser, so CKEditor is not the right tool for you. Sorry.

    You can find more information in this ticket.

    0 讨论(0)
  • 2021-01-06 07:03

    You can try doing something similar to this:

    CKEDITOR.dtd.a.div = 1;
    CKEDITOR.dtd.a.p = 1;
    

    src: http://ckeditor.com/forums/Support/CKEditor-wont-allow-inside

    0 讨论(0)
提交回复
热议问题