WYSIWYG editor and custom block code

cs-cart documentation states

Adding Code to or Particular Place of the Page

  1. Disable WYSIWYG editors. They are convenient for writing blog articles or product descriptions, but can remove the “unnecessary bits” of the code and break it. Even if you switch to the source code editing mode (usually it’s the <> button in the editor), the code can get broken next time you edit and save the block.

Once block has been modified presumably you can turn the WYSIWYG editor back on? If not blog, page, product etc by vendors is significantly restricted?

That’s a fair point, and yes, you can turn the editor back on once you’re finished editing. There are 2 reasons why we suggested disabling it (and both reasons have other workarounds that don’t require disabling WYSIWYG):

  • It’s easy to forget to switch to the code mode and break the code. The solution here is to always be in the Code <> mode before saving.

  • When you open a block for editing, WYSIWYG editor might break the existing code before you even get the chance to switch to the Code <> mode. I think it’s a rarer case, but we didn’t rule it out. The solution is to check the code before saving, or just edit the code elsewhere and paste the results.


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.