Answers.Body: <p>Thanks guys - yes I'm fully aware of the downfall of letting clients run free with the editor, and we've had discussions internally about tables &amp; trying to stop the client from using them but in this particular case there's a real need for an editor which is more fully featured.</p>
  
  <p>I am however looking for a solution, and CKEditor seems like the best.  I've looked at the likes of Super Table and the matrix options but they don't provide the ability to edit content inline like we need.</p>
  
  <p>When I asked the original question I was hoping that there was more featured wysiwyg plugin out there, or perhaps extra config options on redactor which I had missed, but unfortunately it seems this isn't the case.</p>
  
  <p>In the meantime I've gone down the route of integrating CKEditor and it looks promising, I'll post back here with some 'learnings' later today once I've finished testing the new plugin &amp; custom field.</p>
  
  <p>EDIT:</p>
  
  <p>For those who are interested, I've integrated CKEditor into the site I'm working on.  The process was relatively painless and look just a few hours.</p>
  
  <p>Steps:</p>
  
  <ul>
  <li>I created a new craft plugin which consists of a Custom Field Type and a Template</li>
  <li>The template is simple, just includes the Textarea for displaying on the page</li>
  <li>I then queue in the CKEditor javascript files, and my own custom JS file which triggers the CKEDITOR.replace function</li>
  <li>I then wanted the Image button on the toolbar to link to the Craft asset dialoog, so I copied the Image dialog code from the RichText plugin and added it to CKEditor as a new plugin, then added a custom button to the editor toolbar</li>
  <li>I noticed that the current/old Body text from Craft referred to asset:url in the output for images rather than image paths, so I created a RegEx to display these correctly; this regex runs in the prepValue() function of the custom field</li>
  <li>I didnt need a prepValuePost() function</li>
  <li>And then on my website pages, {{ entry.body }} was outputting escaped HTML characters, so I adjusted this to {{ entry.body|raw }}</li>
  </ul>
  
  <p>The end result is pretty good, works well and was surprisingly quick to implement.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-29T22:38:52.533Z
Answers.Text: Take a look at TinyMCE as well. I find Tiny's UI slightly slicker than CK (and your client will might feel right at home if they're coming from something like WordPress for example) but I don't think there's a huge difference in either.  Let us how how it goes!
Answers.UserDisplayName: RitterKnight
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-30T06:51:48.970Z
Answers.Text: Isn't the Redactor Table plugin an option? If tables is all you need ... Redactor is quite extensible, I wouldn't go through the trouble of integrating a new WYSIWIG-editor ...
Answers.UserDisplayName: Paul
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-01T03:19:05.437Z
Answers.Text: I'm specifically needing the ability to do colspan & rowspan, and a few other formatting options as well.  The current reactor plugin is limited to adding columns & rows.
Answers.UserDisplayName: Donald
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-12T10:40:28.807Z
Answers.Text: Would you mind sharing the plugin you created? I find myself needing to get TinyMCE working in Craft, and having never done a Craft plugin before, I'd love to have a similar one as a jumping-off point.
Answers.UserDisplayName: Sandwich
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-29T22:27:20.033Z
Answers.LastActivityDate: 2015-08-01T03:28:48.713Z
Answers.LastEditDate: 2015-08-01T03:28:48.713Z
Answers.UserDisplayName: Donald
Answers.Body: <p>From my experience, I try to strip out as much formatting options as I can from any wysiwyg editor. Otherwise you'll end up with large, purple text with a red background (or some other crazy style the client thinks looks good).</p>
  
  <p>I understand the client wants to construct a table - then alter the table along with the graphics etc. </p>
  
  <p>What if...</p>
  
  <p>Create a <a href="http://buildwithcraft.com/docs/matrix-fields" rel="nofollow">matrix field</a>, then within that have a block for the <a href="http://buildwithcraft.com/docs/rich-text-fields" rel="nofollow">rich text area</a>, then another block that is of <a href="http://buildwithcraft.com/docs/table-fields" rel="nofollow">type table</a>? I'm not 100% on what capabilities that the table field type has. That should allow them to create the table and work with it.</p>
  
  <p>I would then have some sort of pre-defined css that took over for them, rather than giving the client free reign on the design.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-29T14:51:04.630Z
Answers.LastActivityDate: 2015-07-29T14:51:04.630Z
Answers.UserDisplayName: Damon
Answers.Body: <blockquote>
    <p>Am I heading down the wrong path?</p>
  </blockquote>
  
  <p>If you gotta ask that question, sometimes it's a self-fullilling prophecy! ;)</p>
  
  <p>One of the big reasons people use Craft is it does a great job of separating <em>content</em> from layout, which is becoming important when trying to build for all types of screens as Damon also alluded to in <a href="https://craftcms.stackexchange.com/a/10758/1016">his answer</a>.</p>
  
  <p>Tables are tough. I try to avoid them if possible because they can break mobile layouts and a lot of clients still want to use them for presentation instead of what they're intended for... tabular content. When I get a request like this from a client, I always look <em>why</em> the client asking for more advanced table fuctionality. Is there something else we can do to fulfill that request that Craft's <a href="http://buildwithcraft.com/docs/table-fields" rel="nofollow noreferrer">built-in table field</a> can't handle?</p>
  
  <p>What kinds of table content are they needing to create? You might want to look at <a href="https://github.com/engram-design/SuperTable" rel="nofollow noreferrer">Super Table</a>. That gives you a fighting chance of having the client enter their content while still having some control over the design. It's a bit like souped up Matrix field but designed with tables in mind.</p>
  
  <p>Going the opposite direction, Redactor also has a very simple <a href="http://imperavi.com/redactor/plugins/table/" rel="nofollow noreferrer">Table plugin</a> too. It likely won't work in your case but it can do the job for simple, one-off tables, depending on the client's use case. (For example you can get the table started for them and if it needs changes, they can pop those in).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-12T20:07:20.813Z
Answers.Text: Sometimes clients need tables for tabular data -- tabular data *is* content (not layout), and it's a fairly common use-case in my experience. The problem with Super Table is that the designer defines the columns, not the content author. And the problem with Redactor's table plugin is that there's no control over column widths or heading styles. (In general Redactor is absurdly limited, and their solution to any hard problem seems to be "remove the feature")
Answers.UserDisplayName: Jordan Lev
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-12T21:56:36.520Z
Answers.Text: @JordanLev I see you mentioned [table maker](http://plugins.supercooldesign.co.uk/plugin/table-maker) in your answer. That wasn't around when this post was written and can solve some use cases nicely, especially the percentage of columns.
Answers.UserDisplayName: RitterKnight
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-29T14:58:58.110Z
Answers.LastActivityDate: 2015-07-29T15:22:21.673Z
Answers.LastEditDate: 2017-04-13T12:50:59.930Z
Answers.UserDisplayName: RitterKnight
Answers.Body: <p>This is an old question, but in case it helps anyone else there's a plugin that alleviates some of the limitations of Redactor's absurdly simplistic table button: <a href="http://plugins.supercooldesign.co.uk/plugin/table-maker" rel="nofollow noreferrer">http://plugins.supercooldesign.co.uk/plugin/table-maker</a></p>
  
  <p>It's a separate fieldtype so you can have a separate Matrix block for it. It allows the user to set relative column widths and left/center/right alignment. And because it's a fieldtype, you have total control over the markup structure.</p>
  
  <p>Still not as robust as TinyMCE or CKEditor's inline table maker thing, but might help in some situations.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-10T03:49:53.843Z
Answers.LastActivityDate: 2017-04-10T03:49:53.843Z
Answers.UserDisplayName: Jordan Lev
Body: <p>I have a client who requires more advanced formatting options than the current Redactor editor provides, like editing table cells, merging cells, background colors, etc.</p>
  
  <p>My plan is to integrate CKEditor into Craft as a custom field type and a plugin - and basically switch out the current limited editor with CKEditor.</p>
  
  <p>Has no one else needed a more advanced editor than the stock?  Am I heading down the wrong path?</p>
  
Tags: <redactor><editor><wysiwyg>
Title: Craft WYSIWYG editor and CKEditor
ThreadText: # Craft WYSIWYG editor and CKEditor
  
  (Asked by: username_0 on 2015-07-29)
  
  I have a client who requires more advanced formatting options than the current Redactor editor provides, like editing table cells, merging cells, background colors, etc.
  
  My plan is to integrate CKEditor into Craft as a custom field type and a plugin - and basically switch out the current limited editor with CKEditor.
  
  Has no one else needed a more advanced editor than the stock? Am I heading down the wrong path?
  
  **Tags:** redactor, editor, wysiwyg
  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_0 on 2015-07-29. Score: 2 | Accepted answer
  
  Thanks guys - yes I'm fully aware of the downfall of letting clients run free with the editor, and we've had discussions internally about tables & trying to stop the client from using them but in this particular case there's a real need for an editor which is more fully featured.
  
  I am however looking for a solution, and CKEditor seems like the best. I've looked at the likes of Super Table and the matrix options but they don't provide the ability to edit content inline like we need.
  
  When I asked the original question I was hoping that there was more featured wysiwyg plugin out there, or perhaps extra config options on redactor which I had missed, but unfortunately it seems this isn't the case.
  
  In the meantime I've gone down the route of integrating CKEditor and it looks promising, I'll post back here with some 'learnings' later today once I've finished testing the new plugin & custom field.
  
  EDIT:
  
  For those who are interested, I've integrated CKEditor into the site I'm working on. The process was relatively painless and look just a few hours.
  
  Steps:
  
  * I created a new craft plugin which consists of a Custom Field Type and a Template
  * The template is simple, just includes the Textarea for displaying on the page
  * I then queue in the CKEditor javascript files, and my own custom JS file which triggers the CKEDITOR.replace function
  * I then wanted the Image button on the toolbar to link to the Craft asset dialoog, so I copied the Image dialog code from the RichText plugin and added it to CKEditor as a new plugin, then added a custom button to the editor toolbar
  * I noticed that the current/old Body text from Craft referred to asset:url in the output for images rather than image paths, so I created a RegEx to display these correctly; this regex runs in the prepValue() function of the custom field
  * I didnt need a prepValuePost() function
  * And then on my website pages, {{ entry.body }} was outputting escaped HTML characters, so I adjusted this to {{ entry.body|raw }}
  
  The end result is pretty good, works well and was surprisingly quick to implement.
  
  > **Comments:**
  > **username_1**: Take a look at TinyMCE as well. I find Tiny's UI slightly slicker than CK (and your client will might feel right at home if they're coming from something like WordPress for example) but I don't think there's a huge difference in either.  Let us how how it goes!  
  > **username_2**: Isn't the Redactor Table plugin an option? If tables is all you need ... Redactor is quite extensible, I wouldn't go through the trouble of integrating a new WYSIWIG-editor ...  
  > **username_0**: I'm specifically needing the ability to do colspan & rowspan, and a few other formatting options as well.  The current reactor plugin is limited to adding columns & rows.  
  > **username_3**: Would you mind sharing the plugin you created? I find myself needing to get TinyMCE working in Craft, and having never done a Craft plugin before, I'd love to have a similar one as a jumping-off point.  
  
  ---
  
  ### Answer by username_4 on 2015-07-29. Score: 2
  
  From my experience, I try to strip out as much formatting options as I can from any wysiwyg editor. Otherwise you'll end up with large, purple text with a red background (or some other crazy style the client thinks looks good).
  
  I understand the client wants to construct a table - then alter the table along with the graphics etc.
  
  What if...
  
  Create a [matrix field](http://buildwithcraft.com/docs/matrix-fields), then within that have a block for the [rich text area](http://buildwithcraft.com/docs/rich-text-fields), then another block that is of [type table](http://buildwithcraft.com/docs/table-fields)? I'm not 100% on what capabilities that the table field type has. That should allow them to create the table and work with it.
  
  I would then have some sort of pre-defined css that took over for them, rather than giving the client free reign on the design.
  
  
  ---
  
  ### Answer by username_1 on 2015-07-29. Score: 2
  
  > Am I heading down the wrong path?
  
  If you gotta ask that question, sometimes it's a self-fullilling prophecy! ;)
  
  One of the big reasons people use Craft is it does a great job of separating *content* from layout, which is becoming important when trying to build for all types of screens as username_4 also alluded to in [his answer](https://craftcms.stackexchange.com/a/10758/1016).
  
  Tables are tough. I try to avoid them if possible because they can break mobile layouts and a lot of clients still want to use them for presentation instead of what they're intended for... tabular content. When I get a request like this from a client, I always look *why* the client asking for more advanced table fuctionality. Is there something else we can do to fulfill that request that Craft's [built-in table field](http://buildwithcraft.com/docs/table-fields) can't handle?
  
  What kinds of table content are they needing to create? You might want to look at [Super Table](https://github.com/engram-design/SuperTable). That gives you a fighting chance of having the client enter their content while still having some control over the design. It's a bit like souped up Matrix field but designed with tables in mind.
  
  Going the opposite direction, Redactor also has a very simple [Table plugin](http://imperavi.com/redactor/plugins/table/) too. It likely won't work in your case but it can do the job for simple, one-off tables, depending on the client's use case. (For example you can get the table started for them and if it needs changes, they can pop those in).
  
  > **Comments:**
  > **username_5**: Sometimes clients need tables for tabular data -- tabular data *is* content (not layout), and it's a fairly common use-case in my experience. The problem with Super Table is that the designer defines the columns, not the content author. And the problem with Redactor's table plugin is that there's no control over column widths or heading styles. (In general Redactor is absurdly limited, and their solution to any hard problem seems to be "remove the feature")  
  > **username_1**: @username_5 I see you mentioned [table maker](http://plugins.supercooldesign.co.uk/plugin/table-maker) in your answer. That wasn't around when this post was written and can solve some use cases nicely, especially the percentage of columns.  
  
  ---
  
  ### Answer by username_5 on 2017-04-10. Score: 0
  
  This is an old question, but in case it helps anyone else there's a plugin that alleviates some of the limitations of Redactor's absurdly simplistic table button: <http://plugins.supercooldesign.co.uk/plugin/table-maker>
  
  It's a separate fieldtype so you can have a separate Matrix block for it. It allows the user to set relative column widths and left/center/right alignment. And because it's a fieldtype, you have total control over the markup structure.
  
  Still not as robust as TinyMCE or CKEditor's inline table maker thing, but might help in some situations.
  
  
  ---
  
  