Change new line behavior for one custom format for Tinymce in Directus #9551
brendengerber
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using Tinymce with Directus and trying to add a custom formatting option for a blog that I will use to format blocks of code. Currently I have it set up like this and it's working almost as intended (entered into the Custom Formats section in Directus)
The issue that I am having is that when I hit enter it creates a new span. The issue this causes is that now each line gets a border around it, when the intended behavior is to have the border go around the entire block. Is there a way to force Tinymce to add a br tag instead of creating a new span for ONLY this code block (I want to keep the default behavior for other things like p and h1)?
As a follow up, is there away to prevent the span from being nested inside a p tag (Ideally I would set the inline element of the custom format to p, but it doesn't work, so I have used span instead)?
Beta Was this translation helpful? Give feedback.
All reactions