WYSIWYG spoils html code

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm

Re: WYSIWYG spoils html code

Post by carasmo »

I think the editor works just as intended, you need to separate this custom html from the content that's inside the main editor. There's a variety of ways, make a new template without the editor, turn it off for that page, or for a large site that I did where the client had many, many pages that had lists of images and text that needed to be floated and styled, I did the following:

On the template I put this at the very top, before the html start tag:

Code: Select all

{content block="custom" page_tab="main" assign="custom" label="Custom Content" wysiwyg="false"}
Then one the pages with this custom stuff, I put the html required and then stuck the following where it appears in the content flow:

Code: Select all

{$custom}
So you can have the regular text, the images, the stuff that the wysiwyg can handle and where you want to put the custom stuff, just put {$custom}. Make sure you don't stick it between p tags or some other way of making it not validate.
Колючка
Forum Members
Forum Members
Posts: 19
Joined: Tue Jul 17, 2012 8:24 am

Re: WYSIWYG spoils html code

Post by Колючка »

I know there are ways to side-step this "bug feature" and I use some of it, thanks a lot Carasmo for a complicated (for me) one :) Maybe I'll try it on a bigger project.

I know I can disable wysiwyg mode on a certain page, or I can disable wysiwyg mode globally on all pages, and I already did...

But I think it's not a complete solution.
carasmo wrote:I think the editor works just as intended
If this behavior is a feature I'd like it to be documented, if it's a bug, well, is there a bug-tracker?
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm

Re: WYSIWYG spoils html code

Post by Jos »

Колючка wrote:If this behavior is a feature I'd like it to be documented, if it's a bug, well, is there a bug-tracker?
http://www.tinymce.com/develop/bugtracker.php
And please don't mention there that you are using CMS Made Simple...else they will laugh at us for ages
Last edited by Jos on Sat Aug 11, 2012 8:48 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: WYSIWYG spoils html code

Post by Dr.CSS »

You can't expect a wysiwyg to not correct your code when everybody expects it to correct their code, it helps pages validate and everyone should want valid code, even search engines are looking at that now...
timwhite98
New Member
New Member
Posts: 3
Joined: Sat Aug 11, 2012 5:49 pm

Re: WYSIWYG spoils html code

Post by timwhite98 »

FWIW, I switched from PC to Mac and my HTML editor (the popup window that appears by pressing the HTML button) is now appearing.

And since I was able to use the PC in the same way a couple weeks ago, I'm guessing something must've changed.

If this is of use to anyone (and I'm new, so may be clueless and rehasing well known stuff), my OS is Windows 7 on an HP PC.
fredp
Forum Members
Forum Members
Posts: 218
Joined: Sun Jul 27, 2008 1:36 am

Re: WYSIWYG spoils html code

Post by fredp »

Колючка wrote:...That's not my point. I just don't like undocumented, unpredictable, "undisablable" thing. ...
Have you visited the tinymce.com reference docs or searched for (or asked about) this on their forum? TinyMCE has many "documented" cleanup-related config. options that may (or may not) let you "cripple" the editor to your liking.

One can, at their own risk, specify extra options in the Extra Configuration box under the Advanced tab of the Extensions>>TinyMCE WYSIWYG page of the Admin console.

That said, just because something may be possible doesn't mean it's a good idea!
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
Колючка
Forum Members
Forum Members
Posts: 19
Joined: Tue Jul 17, 2012 8:24 am

Re: WYSIWYG spoils html code

Post by Колючка »

Jos wrote:when everybody expects it to correct their code
And why this "everybody" people are expect this? Look, I'm a newbie in html wysiwyg editing and I didn't expect it will "correct" my code without forewarning.
fredp wrote:Have you visited the tinymce.com reference docs or searched for (or asked about) this on their forum?
If it was only in TinyMCE thing I'd surely visit their forum, but I saw it in MicroTiny, TinyMCE and FСКeditorХ wysiwyg editors, and I certainly thought that was cms's problem.

OK, now I see that's kinda "feature" and can not be disabled. I don't like it but what can I do? Just don't use wysiwyg at all. Topic is not "solved" but must be "closed" I guess. Thank you everybody for help and patience.

Dismissed :)
Post Reply

Return to “CMSMS Core”