Can I edit the Tinymce configuration to allow block-level elements to be children of inline elements?

thugsb's Avatar

thugsb

23 Apr, 2015 09:14 PM

I want to create a link with a <h3> inside it, as well as other elements. But when I do so, Tinymce keeps kicking the H3 outside of my <a>. This is due to the Tinymce settings. Can I edit the tinymce settings? Or can you? In HTML5, block level elements are allowed to be inside inline elements.

This discussion shows what needs to happen: http://stackoverflow.com/questions/14597219/how-to-configure-tinymc...

  1. 1 Posted by Bradley Wagner on 23 Apr, 2015 11:06 PM

    Bradley Wagner's Avatar

    Short answer is "no, not yet" though we will be looking to integrate HTML5 support in the next version of the editor that we release in the near future and to make it more end-user configurable.

  2. 2 Posted by thugsb on 24 Apr, 2015 02:37 PM

    thugsb's Avatar

    Yes please! :) Any ETA on that?

  3. 3 Posted by Bradley Wagner on 24 Apr, 2015 05:35 PM

    Bradley Wagner's Avatar

    As soon as we can. It will be our next major release but we don't have a firm timeline at this point. We're targeting a public beta in the fall.

    In the mean time you can request early access to stuff we're working on and test out things you're trying to do in a pre-release versions:

    http://www.hannonhill.com/downloads/cascade/request-sandbox-access-...

    Just put a note that you're interested in Cascade 8 too.

  4. Bradley Wagner closed this discussion on 24 Apr, 2015 05:35 PM.

  5. thugsb re-opened this discussion on 09 Jul, 2015 06:55 PM

  6. 4 Posted by thugsb on 09 Jul, 2015 06:56 PM

    thugsb's Avatar

    Can you post the TinyMCE settings that Cascade currently uses please: both the valid_elements and valid_children. Thanks.

  7. 5 Posted by Bradley Wagner on 15 Jul, 2015 04:13 PM

    Bradley Wagner's Avatar

    Sure:

            valid_elements : "*[*]",
            valid_children : "+body[style]",
            extended_valid_elements : "*[*]",
    

    in the most recent version. I can tell you for a particular version as well.

  8. 6 Posted by thugsb on 16 Jul, 2015 04:01 PM

    thugsb's Avatar

    What about in Cascade 7.14.1?

    In 7.14.1 it doesn't allow <a><h2>text</h2></a> and takes the H2 outside of the A. My understanding is that this is happening because valid_children is configured to prevent this due to older HTML spec, is that correct?

    In 7.14.1 is the tinymce schema: "html5" or is it set to something else? If something else, when does it get changed to html5, or doesn't it yet?

    Do you know what the default valid_elements and valid_children are for the schema that is used? I'm intending on processing the WYSIWYG content and want to know exactly what can be expected as "tidied" content coming from TinyMCE. Tx.

  9. 7 Posted by Bradley Wagner on 16 Jul, 2015 04:14 PM

    Bradley Wagner's Avatar

    It's defaulting to schema: "html4" in this version and yes, I believe you're correct that that is why TinyMCE is taking the header outside of the hyperlink.

    Do you know what the default valid_elements and valid_children are for the schema that is used?

    Can you clarify your question? We're declaring the valid_elements, valid_children, extended_valid_elements explicitly which effectively overrides the defaults for the schema.

    The header tag is being taken out of the hyperlink, I believe, is being done independently of the valid_elements settings.

    Let me know what else I can answer.

  10. 8 Posted by thugsb on 16 Jul, 2015 09:14 PM

    thugsb's Avatar

    You are declaring the valid_elements, which overrides.

    However, the valid_children has +body[style], which means it gets added to and doesn't override. So the valid_children will be the HTML4 schema. But the tinymce site just links to the W3 specification. I was hoping I could get the actual setting, so I knew exactly what it was.

    In what version of Cascade will you update to the html5 schema?

  11. 9 Posted by Bradley Wagner on 16 Jul, 2015 09:21 PM

    Bradley Wagner's Avatar

    Unfortunately, I don't have any more details than what TinyMCE's documentation provides with respect to what's included in valid_children.

    We intend to update it to html5 in Cascade 8.

  12. 10 Posted by thugsb on 16 Jul, 2015 09:22 PM

    thugsb's Avatar

    Do you have an ETA for Cascade8? ;)

  13. 11 Posted by Bradley Wagner on 16 Jul, 2015 09:27 PM

    Bradley Wagner's Avatar

    I don't. We're targeting a beta release in the next few months and then it will depend on the feedback we get.

  14. 12 Posted by thugsb on 16 Jul, 2015 09:29 PM

    thugsb's Avatar

    Thanks

  15. thugsb closed this discussion on 16 Jul, 2015 09:29 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac