Jump to content

Ckeditor Not Playing Nicely With Tags


Recommended Posts

Posted

When creating an email template and doing something like this:

 

<table>

{% for item in items %}

<tr><td>{item.key}</td></tr>

{% endfor %}

</table>

 

After saving or switching from source to preview, it morphs it to this:

 

{% for item in items %}

<table><td><td>{item.key}</td></tr></table>

[% endfor %}

Posted

You might have to save and edit in source mode only. We spent a lot of time considering different WYSIWYG editors that are license friendly, and it was the best, but they all seem to have some problems.

Posted

You might have to save and edit in source mode only. We spent a lot of time considering different WYSIWYG editors that are license friendly, and it was the best, but they all seem to have some problems.

Happens then too. :/

 

Thought I made it clear but I didn't, my bad. o.O

Posted

What did you try, exactly?

 

Copied your top code in source and clicked on the source button to show the WYSIWYG tools, then clicked source again.

Posted

When creating an email template and doing something like this:

 

<table>

{% for item in items %}

<tr><td>{item.key}</td></tr>

{% endfor %}

</table>

 

After saving or switching from source to preview, it morphs it to this:

 

{% for item in items %}

<table><td><td>{item.key}</td></tr></table>

[% endfor %}

 

 

I have detected the same problem (its a knowing bug from ckeditor), I have a solution implanted in one client that use the same wysiwyg editor (ckeditor), I will post the solution on monday :)

 

Regards,

PV

Posted

Here you go :)

 

Solution:
 
Open file: vendors/ckeditor/config.js
 
find on line 8:
 
// Define changes to default configuration here. For example:

change to:

config.protectedSource.push( /{[\s\S]*?}/g );   // Blesta code
// Define changes to default configuration here. For example:

Tell me if it worked :)

 

Regards,

PV

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...