WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

questions about client side scripting

WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Beitragvon linxy » Sa Mai 23, 2009 10:07 pm

Hi,

I've just found a strange behavior of the WYSIWYG editor. If I want to make some text bold, different browsers produce different code:

Firefox: <span style="font-weight: bold;">bold text</span>
MSIE and other browsers: <strong>bold text</strong>

Visually the output looks the same, but there is a big difference for SEO. Can I somehow set Firefox to produce the same code as MSIE, i.e. <strong>bold text</strong> or is it possible to change the javascript somewhere?

Thank you very much
linxy
Junior Member
 
Beiträge: 15
Registriert: Sa Mai 23, 2009 9:59 pm

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Beitragvon deemes » Sa Mai 23, 2009 11:37 pm

Welcome linxy,

sadly it's not possible to control this behavior. The WYSIWYG editor makes use of functions implementet right in the browser itself. So it uses just what the browser thinks is right. Here you'll find a list of some differences.

Though, with some coding skills it's possible to run the parsed content through your own PHP function to clean up the mess by replacing any span by it's semantic counterpart.

Regards,
Daniel
deemes
Senior Member
 
Beiträge: 664
Registriert: Mi Mai 23, 2007 10:40 am

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Beitragvon linxy » So Mai 24, 2009 10:10 am

Daniel, thank you for your reply.
It's a really a pity. I'm thinking about implementing another WYSIWYG editor, that would be more configurable. I believe, that it would be very useful to have a choice from two or more editors.

Has anybody tried to implement other WYSIWYG editor, e.g. TinyMCE, FCKedior, NicEdit, or another? Can you give me any kickstart? Where should I start and what should I consider?

Thank you all
linxy
Junior Member
 
Beiträge: 15
Registriert: Sa Mai 23, 2009 9:59 pm

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Beitragvon deemes » So Mai 24, 2009 11:20 am

Hi linxy,

with objects it should be pretty easy. You may inject your own JavaScript files by using HTML-Code inside the description of any field. So you could define a textarea wysiwyg=false, include your editors sources by linken to them inside the description field and turn that textarea into a rich HTML editor of your choice.

Doing this, you will loose lot of functionality. There are many functions inside the WYSIWYG that are unique to WE, e.g. the linking to internal documents through their ID or linking to objects. You'd need to reproduce all of this inside the editor of your choice.

Though, I don't see a chance with documents. At least it won't be too easy.

There is a feature request (german) regarding this. Though, I guess no one's up to care about that one. :evil:
deemes
Senior Member
 
Beiträge: 664
Registriert: Mi Mai 23, 2007 10:40 am

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Beitragvon linxy » So Mai 24, 2009 12:08 pm

You're right, it could be too complicated, but there might be another solution. I will think about it :)

Thank you
linxy
Junior Member
 
Beiträge: 15
Registriert: Sa Mai 23, 2009 9:59 pm

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Beitragvon Dirk Einecke » So Mai 24, 2009 12:34 pm

Hi,

to take care that all editors are using the same browser (with the same output) you can use a construktion like this:

Code: Alles auswählen
<we:ifEditmode>
  <we:ifClient browser="mozilla">
    <we:input type="text" name="headline" />
  </we:ifClient>
</we:ifEditmode>

<we:ifNotEditmode>
  <we:input type="text" name="headline" />
</we:ifNotEditmode>


greetings
Dirk Einecke
Dirk Einecke
Site Admin
 
Beiträge: 3736
Registriert: Do Jan 01, 1970 2:00 am
Wohnort: Karlsruhe

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Beitragvon WBTMagnum » Fr Mai 29, 2009 12:42 am

Hi there,

deemes hat geschrieben:There is a feature request (german) regarding this. Though, I guess no one's up to care about that one. :evil:


Thanks for the link!

Since a few projects we are thinking about implementing TinyMCE into WE. We have already done a similar task for our last Plone project. So we are willing to help out solving this issue, but we certainly can't do this alone and without help from a WE developer.


Best regards,
Sascha
WBTMagnum
Senior Member
 
Beiträge: 386
Registriert: Di Mär 07, 2006 4:50 pm

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Beitragvon Toddler » So Dez 05, 2010 11:14 am

See here in German language with a short script, that replaces wrong Markup by using PHP and Regex:
viewtopic.php?f=23&t=14716
Toddler
Member
 
Beiträge: 76
Registriert: Fr Jul 04, 2008 1:49 pm

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Beitragvon danialpaul1 » Fr Nov 25, 2011 11:15 am

thanks for refer direct thread link & its cool to have short script !
danialpaul1
Junior Member
 
Beiträge: 1
Registriert: Sa Nov 19, 2011 10:15 pm


Zurück zu JavaScript

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast