CKEditor messes up the cms page

I am developing a website using CMS and I have switched the text editor to ckeditor but now when I am selecting source of my already created pages, there parsing seems incorrect and it almost always misses some of the closing tags which throws the error of parsing the page?
Are there any more editors available for fuel which don't mess up my scripts as I have created the whole website on cms pages.

Comments

  • I use CKE exclusively and never have a problem. What tags get lost? Are you running the latest Fuel?

  • edited June 2018

    Well I am running 1.4.3 and that is latest last time I checked? Quoting an example
    Shortened to only relative part, basically its a table
    See the {if} block and {foreach} one
    This

    <div class="table-responsive">
    ....
                            <tbody class="table-striped table-hover">
                                {if !$applicants}
                                <tr>
                                    <td class="text-center" colspan="5">No data to display</td>
                                </tr>
                                {/if}
                                {foreach $applicants applicant}
                                <tr>
    .....
                                </tr>
                                {/foreach}
    ......
                    </div>
    

    becomes this

    <div class="table-responsive">
    {if !$applicants}{/if}{foreach $applicants applicant}{/foreach}
    ......
                                <tr>
                                    <td class="text-center" colspan="5">No data to display</td>
                                </tr>
                                <tr>
    ......
                                </tr>
    ......
                    </div>
    

    when I select the Source

  • If you have a lot of template coding that you want to put in the CMS, I would recommend trying to refactor them into blocks that you could then include in your templating code as simply {fuel_block('my_block')} instead that could then include that logic in the static view file in the fuel/application/views/_blocks/my_block.php (more on blocks here: http://docs.getfuelcms.com/general/blocks).

    The default is the marktItUp! editor which isn't necessarily a WYSIWYG but doesn't mess with the code nearly as much as CKEditor.

  • oh, thanks for that, I'll see what I can do. And also can I try any other editor in cms?

  • FUEL only supports CKEditor and markItUp!

  • What about the editors file in config? I can use markdown for writing content? Will that also support template parsing?

  • You can use the "markdown" parameter in your fields configuration to make the markItUp! editor use the markdown syntax.
    http://docs.getfuelcms.com/general/forms#wysiwyg

  • Would that have any effect on template parsing? Because I can't put the code for pages in files, I need it to be in cms pages or blocks as I want the client to be able to change it without going into files

  • The template parsing should actually work better with markItUp! because it doesn't do as much manipulation of the HTML code as CKEditor.

  • Yeah but the client wants to use the WYSIWYG as they are not familiar with coding

Sign In or Register to comment.