WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

questions about client side scripting
linxy
Junior Member
Beiträge: 15
Registriert: Sa 23. Mai 2009, 21:59

WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Beitragvon linxy » Sa 23. Mai 2009, 22:07

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

deemes

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Beitragvon deemes » Sa 23. Mai 2009, 23:37

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

linxy
Junior Member
Beiträge: 15
Registriert: Sa 23. Mai 2009, 21:59

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

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

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

deemes

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

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

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:

linxy
Junior Member
Beiträge: 15
Registriert: Sa 23. Mai 2009, 21:59

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

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

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

Thank you

Dirk Einecke
Senior Member
Beiträge: 3735
Registriert: Do 1. Jan 1970, 02:00
Wohnort: Karlsruhe
Kontaktdaten:

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

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

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

WBTMagnum
webEdition Partner
webEdition Partner
Beiträge: 1825
Registriert: Di 7. Mär 2006, 16:50
Wohnort: Wien
Kontaktdaten:

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Beitragvon WBTMagnum » Fr 29. Mai 2009, 00:42

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

Toddler
Member
Beiträge: 76
Registriert: Fr 4. Jul 2008, 13:49

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Beitragvon Toddler » So 5. Dez 2010, 11:14

See here in German language with a short script, that replaces wrong Markup by using PHP and Regex:
http://forum.webedition.org/viewtopic.php?f=23&t=14716

danialpaul1
Junior Member
Beiträge: 1
Registriert: Sa 19. Nov 2011, 22:15

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

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

thanks for refer direct thread link & its cool to have short script !


Zurück zu „JavaScript“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 0 Gäste