Answers.Body: <p>Rich Text fields in Craft have several options to them that can affect code output. In your field settings, make sure you don't have <code>Clean up HTML?</code> ticked. As the description reads, this option:</p>
  
  <blockquote>
    <p>Removes spans, empty tags, and most style attributes on save.</p>
  </blockquote>
  
  <p>Without seeing your field, this is a wild guess at what could be the problem.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-10T12:05:28.507Z
Answers.Text: Thanks Jamie, I forgot to mention that the `Clean up HTML?` field is unchecked. I'll add that to my question for clarity.
Answers.UserDisplayName: Michael Thomas
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-10T12:06:05.573Z
Answers.Text: @MichaelThomas Ah, in that case ignore me! :)
Answers.UserDisplayName: Jamie Wade
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-10T13:41:10.547Z
Answers.Text: If you want to get your hack on change line 4295 to if (this.utils.isCurrentOrParent('PRE')) return;
Answers.UserDisplayName: JP DeVries
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-10T12:04:02.947Z
Answers.LastActivityDate: 2015-03-10T12:04:02.947Z
Answers.UserDisplayName: Jamie Wade
Body: <p>On a fairly fresh site (and also on some more built up sites) I noticed that Redactor is preventing you from doing the following:</p>
  
  <ol>
  <li>Create a heading such as an H1 or H2 with two or more words</li>
  <li>Select only one of the words in the heading</li>
  <li>Attempt to apply styling, such as bold or italic to that word</li>
  </ol>
  
  <p>This should result in some simple markup such as:</p>
  
  <pre><code>&lt;h1&gt;My list of &lt;strong&gt;words&lt;/strong&gt;&lt;/h1&gt;
  </code></pre>
  
  <p>But it does not apply this styling.</p>
  
  <p>Is this a bug with redactor? Intended behavior? Do you know a clever work around that would utilize Redactor's native buttons?</p>
  
  <p>Edit:</p>
  
  <ul>
  <li>The <code>Clean Up HTML?</code> field is unchecked on this redactor settings type.</li>
  <li>This bug seems to be a redactor bug, it exists on <a href="http://imperavi.com/redactor/" rel="nofollow">http://imperavi.com/redactor/</a></li>
  </ul>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-10T16:48:15.603Z
Comments.Text: Looks like a Redactor bug to me, too. I've send them an email about it.  Going to vote to close this question as it's a bug.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-22T13:28:00.947Z
Comments.Text: Did they respond back on that bug report, Brad? This issue is not a minor one (you can't string / em in headings!), but still exists on 10.1.1, which you can test on http://imperavi.com/redactor/.
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-27T10:35:27.260Z
Comments.Text: @BradBell forgot the at-mention with the previous comment. So now again, did they respond? I just checked and they released 10.1.2 in the meantime, but the bug's still not fixed. :(
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-27T15:54:46.473Z
Comments.Text: @carlcs - Oops. Forgot to update with their response, which I don't really agree with. `"For code streamlining purposes and to implement more of best practices and to improve compatibility, Redactor doesn't allow inline styling of headings (starting with version 10); please, advise your client to use CSS instead, whenever possible."`
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-27T15:55:12.177Z
Comments.Text: @carlcs So essentially "Bug Status: Closed Won't Fix".
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-27T16:09:56.020Z
Comments.Text: @BradBell WHAT?? This isn't true.
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-27T16:10:56.287Z
Comments.Text: Do they mention any references for their "best practices"?
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-27T17:24:10.693Z
Comments.Text: @carlcs Nope... makes no sense to me, either.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-28T12:00:38.107Z
Comments.Text: @BradBell Not to belabor the issue, but how is a client end-user supposed to achieve the desired result "use[ing] CSS instead"? My question is how can a portion of a heading be emphasized or bolded? The only way to target words within a tag is by placing another tag inside said heading, which is what they won't support.
Comments.UserDisplayName: Michael Thomas
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-16T19:59:23.087Z
Comments.Text: I had to edit redactor.js to get this to work, what a joke. Line 4165 comment out: if (this.utils.isCurrentOrParent('PRE') || this.utils.isCurrentOrParentHeader()) return;
Comments.UserDisplayName: Simon
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-07T16:35:35.433Z
Comments.Text: I received a similar response from Imperavi. It seems like our options are either to toggle code view and add tags manually or to build a custom redactor plugin to handle the desired heading functionality.
Comments.UserDisplayName: Jim Butts
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-09-29T14:23:03.627Z
Comments.Text: I'm just starting to get into Craft, and am evaluating its suitability for a site with significant text formatting. From what I've seen, Redactor seems like more of a liability than anything else... it doesn't even have a "Remove Styles" button, FFS. So if you accidentally bold something, good luck unbolding it without diving into the source! What are the chances of Craft switching over to a different, more mature WYSIWYG editor, such as CK Editor?
Comments.UserDisplayName: Sandwich
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-26T17:56:11.383Z
Comments.Text: Imperavi released Redactor II 1.0.2 today and *finally* added inline formatting in headings and tables. Please re-open so I can add an answer, thanks! @Simon
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-26T17:59:52.490Z
Comments.Text: @BradBell you did not yet abandon Redactor for future Craft releases (2.5, 3.0), did you?
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-26T18:03:09.587Z
Comments.Text: @carlcs Nope. Redactor II will be in 2.5.
Comments.UserDisplayName: Brad Bell
Tags: <redactor>
Title: Redactor won't allow simple styling in heading tags
ThreadText: # Redactor won't allow simple styling in heading tags
  
  (Asked by: username_0 on 2015-03-10)
  
  On a fairly fresh site (and also on some more built up sites) I noticed that Redactor is preventing you from doing the following:
  
  1. Create a heading such as an H1 or H2 with two or more words
  2. Select only one of the words in the heading
  3. Attempt to apply styling, such as bold or italic 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.
  
  Is this a bug with redactor? Intended behavior? Do you know a clever work around that would utilize Redactor's native buttons?
  
  Edit:
  
  * The `Clean Up HTML?` field is unchecked on this redactor settings type.
  * This bug seems to be a redactor bug, it exists on <http://imperavi.com/redactor/>
  
  **Tags:** redactor
  
  > **Comments:**
  > **username_1**: Looks like a Redactor bug to me, too. I've send them an email about it.  Going to vote to close this question as it's a bug.  
  > **username_2**: Did they respond back on that bug report, username_1? This issue is not a minor one (you can't string / em in headings!), but still exists on 10.1.1, which you can test on http://imperavi.com/redactor/.  
  > **username_2**: @username_1 forgot the at-mention with the previous comment. So now again, did they respond? I just checked and they released 10.1.2 in the meantime, but the bug's still not fixed. :(  
  > **username_1**: @username_2 - Oops. Forgot to update with their response, which I don't really agree with. `"For code streamlining purposes and to implement more of best practices and to improve compatibility, Redactor doesn't allow inline styling of headings (starting with version 10); please, advise your client to use CSS instead, whenever possible."`  
  > **username_1**: @username_2 So essentially "Bug Status: Closed Won't Fix".  
  > **username_2**: @username_1 WHAT?? This isn't true.  
  > **username_2**: Do they mention any references for their "best practices"?  
  > **username_1**: @username_2 Nope... makes no sense to me, either.  
  > **username_0**: @username_1 Not to belabor the issue, but how is a client end-user supposed to achieve the desired result "use[ing] CSS instead"? My question is how can a portion of a heading be emphasized or bolded? The only way to target words within a tag is by placing another tag inside said heading, which is what they won't support.  
  > **username_3**: I had to edit redactor.js to get this to work, what a joke. Line 4165 comment out: if (this.utils.isCurrentOrParent('PRE') || this.utils.isCurrentOrParentHeader()) return;  
  > **username_4**: I received a similar response from Imperavi. It seems like our options are either to toggle code view and add tags manually or to build a custom redactor plugin to handle the desired heading functionality.  
  > **username_5**: I'm just starting to get into Craft, and am evaluating its suitability for a site with significant text formatting. From what I've seen, Redactor seems like more of a liability than anything else... it doesn't even have a "Remove Styles" button, FFS. So if you accidentally bold something, good luck unbolding it without diving into the source! What are the chances of Craft switching over to a different, more mature WYSIWYG editor, such as CK Editor?  
  > **username_2**: Imperavi released Redactor II 1.0.2 today and *finally* added inline formatting in headings and tables. Please re-open so I can add an answer, thanks! @username_3  
  > **username_2**: @username_1 you did not yet abandon Redactor for future Craft releases (2.5, 3.0), did you?  
  > **username_1**: @username_2 Nope. Redactor II will be in 2.5.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_6 on 2015-03-10. Score: 0
  
  Rich Text fields in Craft have several options to them that can affect code output. In your field settings, make sure you don't have `Clean up HTML?` ticked. As the description reads, this option:
  
  > Removes spans, empty tags, and most style attributes on save.
  
  Without seeing your field, this is a wild guess at what could be the problem.
  
  > **Comments:**
  > **username_0**: Thanks username_6, I forgot to mention that the `Clean up HTML?` field is unchecked. I'll add that to my question for clarity.  
  > **username_6**: @username_0 Ah, in that case ignore me! :)  
  > **username_7**: If you want to get your hack on change line 4295 to if (this.utils.isCurrentOrParent('PRE')) return;  
  
  ---
  
  