Redactor Can't Apply Anything to Heading Tags
1. Create a heading such as an H1 or H2 with two or more words
2. Select only one/whole of the words in the heading
3. Attempt to apply styling, such as bold, italic, or custom style to that word
This should result in some simple markup such as:
<h1>My list of <strong>words</strong></h1>
But it does not apply this styling.
I try on demo site from softaculous, it's works.
But not on mine.
Is this a bug with redactor or c5?
Also, can anyone tell me how to apply `cleanOnPaste` option for redactor ?
My C5 version is 126.96.36.199
Theme: Plain Bootstrap.
"Create a heading such as an H1 or H2 with two or more words"
"Select only one/whole of the words in the heading"
I am afraid I don't understand what you are describing.
"Attempt to apply styling, such as bold, italic, or custom style to that word"
It appears that you can apply block custom styles to H1-H5, but cannot apply inline custom styles, bold, italic, spans, etc..
This isn't a bug in concrete5, this is the Redactor default behavior. You can see the same behavior in the Redactor and Softaculous demos -http://imperavi.com/redactor/ .
The cleanOnPaste option is set to true in Redactor by default.
Thanks for replies :)
I already read your post herehttps://www.concrete5.org/community/forums/5-7-discussion/redactor-i...
Also read the last comment explaining forceBlock thing.
Thanks for that, So I can apply some for heading element.
After apply block custom style, now I can apply any style for inline element.
Switch to source view, heading text wrapped by 'undefined' tag, and that make any style can apply to the text inline.
Again, thanks for that suggestion post :)
Typing is very slow too, I type some characters and there is major lag. Pretty awful experience compared to 5.7.4 where it was fine by default.
The line break tag wrapped in a paragraph tag on return is default Redactor behavior.
I think this behavior could be changed by setting "linebreaks" to true.
I am not sure why linebreaks isn't true by default or if it affects anything else. If it doesn't, changing it to true in the core version of redactor.js might be useful.
In the meantime, I believe you can use this approach to set linebreaks mode to true:
I don't have any issues with lag when I type.
I've added that code. Now when I add an h1, then press return to go back to paragraph mode type something, then return again and I get this markup:
Not ideal, need to get p tags in there without it adding br's as well
So something has been messed up.
Also, backspace is deleting 2 characters instead of one, it's almost like it's doing everything twice!
I know it has been a year since this post but I believe I have found the solution here:
You have to patch concrete/js/redactor.js on line 3 column 11689 to remove