Seite 1 von 1

WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Verfasst: Sa 23. Mai 2009, 22:07
von linxy
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

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Verfasst: Sa 23. Mai 2009, 23:37
von deemes
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

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Verfasst: So 24. Mai 2009, 10:10
von linxy
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

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Verfasst: So 24. Mai 2009, 11:20
von deemes
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:

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Verfasst: So 24. Mai 2009, 12:08
von linxy
You're right, it could be too complicated, but there might be another solution. I will think about it :)

Thank you

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Verfasst: So 24. Mai 2009, 12:34
von Dirk Einecke
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

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Verfasst: Fr 29. Mai 2009, 00:42
von WBTMagnum
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

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Verfasst: So 5. Dez 2010, 11:14
von Toddler
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

Re: WYSIWYG Firefox vs. MSIE, SAFARI, CHROME

Verfasst: Fr 25. Nov 2011, 11:15
von danialpaul1
thanks for refer direct thread link & its cool to have short script !