HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Correct way to use WYSIWYG?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#59888 (In Topic #13028)
Avatar

Well-settled

Hi,

the WYSIWYG editor is giving me a really hard time.

Once I've changed font formatting, e.g. just the size, I can't change it back or forth. I have to switch to html view to strip tags and then change the font size to something different back in Comcode view. After some hours of trying I found that this behaviour only happens in Firefox (3.6.3). IE7 responds promptly to changing formats.

Then I tried to figure out how to add an email link to a Comcode page. First I had to find out the proper syntax by trying (the tutorial is not too specific about the actual syntax), but finally got it right. Then I noticed that once you typed the link into the WYSIWYG editor and hit preview, the square bracketed tags are gone and only the actual link ist displayed.

Nasty thing is: If I disable WYSIWYG to correct tags/parameters and switch back to WYSIWYG, the Link is displayed fine. But if I do that again, the Comcode is gone and there is plain HTML in the simple editor (and on the page!) that can't be switched back to Comcode again.

Is the editor supposed to work this way or am I getting something terribly wrong here?

CU,
Peter
Back to the top
 
Posted
Rating:
#59897
Avatar

Once I've changed font formatting, e.g. just the size, I can't change it back or forth. I have to switch to html view to strip tags and then change the font size to something different back in Comcode view. After some hours of trying I found that this behaviour only happens in Firefox (3.6.3). IE7 responds promptly to changing formats.

I just had a quick play myself. The WYSIWYG isn't something we've written ourselves, so I usually have to try this out myself too to see how it behaves in certain situations.

It seems to be the case that sometimes in Firefox changing the font size affects everything selected except stuff that is deeper within the selection that already has a different font size. This was inconsistent during my tests though. I could work around this using the clear formatting button (looks like an eraser) before setting the style.

Then I tried to figure out how to add an email link to a Comcode page. First I had to find out the proper syntax by trying (the tutorial is not too specific about the actual syntax), but finally got it right. Then I noticed that once you typed the link into the WYSIWYG editor and hit preview, the square bracketed tags are gone and only the actual link ist displayed.

The WYSIWYG editor will convert to and from Comcode for the purposes of making the Comcode editing visual wherever possible, and saving as Comcode wherever possible.

Nasty thing is: If I disable WYSIWYG to correct tags/parameters and switch back to WYSIWYG, the Link is displayed fine. But if I do that again, the Comcode is gone and there is plain HTML in the simple editor (and on the page!) that can't be switched back to Comcode again.

Is the editor supposed to work this way or am I getting something terribly wrong here?

No, it's supposed to be able to convert it back to Comcode again.
I did a test and it seemed to convert back for me, but I did also find a bug when I did some tests in the background, which will be fixed in the next release.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#59907
Avatar

Well-settled

Hi,

I did further Tests with the editor and found that if you use an unlucky combination of enabling/disabling WYSIWYG mode and re-editing a page that only had pure comcode tags, the comcode is gone forever and gets replaced by html.

The code I used for verifying that is not more complex than this:

Code

[title="1"]Testpage Comcode[/title]

[font size="12pt"][b]E-Mail Addresses[/b][/font]

John Doe
65 Maytree Avenue
Findon Valley
Worthing
3BN 2AD
West Sussex
[email="E-Mail" subject="Just testing" body="Hello"]johndoe@online.com[/email]
I just reproduced the effect in this very message by re-editing it several times and switching WYSIWYG on and off (I added those codeboxes "after"). At least the Comcode syntax in the e mail link is gone. On my website, so is the rest of the comcode, eventually.

Code

[title="1"]Testpage Comcode[/title]

[font size="12pt"][b]E-Mail Addresses[/b][/font]

John Doe
65 Maytree Avenue
Findon Valley
Worthing
3BN 2AD
West Sussex
[email="johndoe@online.com?subject=Just%20testing&body=Hello&"]E-Mail[/email]
I could not reproduce the total loss here in the forum, though. Maybe there's a glitch in my installation of the editor.




Last edit: by Lowlander
Back to the top
 
Posted
Rating:
#59921
Avatar

Hi,

This will be fixed in the next release.
It didn't recognise how to convert part of that back. If you don't have 'dangerous Comcode' permission (e.g. here) it is more aggressive in it's back conversion.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: