Item13476: recognize smilies between html tags

pencil
Priority: Enhancement
Current State: Proposal Required
Released In: n/a
Target Release:
Applies To: Extension
Component: SmiliesPlugin, FoswikiRender
Branches:
Reported By: BirgitNietsch
Waiting For:
Last Change By: GeorgeClark
Sometimes, Smilies are sitting between HTML Tags. For instance, when they are entries in a table cell, and Foswiki decides to remove all those "unnecessary white spaces". And then I end up with:
<table style="weird: perhaps;"><tr><td>:mysmilie:</td></tr></table
which is being rendered as: :mysmilie: (the word, not the smilie).

Of course I can do a search and replace:
search: :coolsmilie:
replace: &nbsp; :coolsmilie: &nbsp;

In this case, the smilies will be recognized, and will appear on my page like they should.

But I will have to repeat that replace every time I edit that page because the editor will "optimize" the html code and will remove those nonbreaking spaces and spaces.

-- BirgitNietsch - 25 Jun 2015

Could you try your test in the http://trunk.foswiki.org/Sandbox ... I think that Wysiwyg on the upcoming 1.2. preserves the white space without the need for the &nbsp;. I'm unable to recreate the loss of the smiley. Take a look at http://trunk.foswiki.org/Sandbox/TestT%C3%B6pic

-- GeorgeClark - 25 Jun 2015

Been there, done that. You have to set some table options inside the editor: border larger than 1, some cell padding, height and width. Otherwise, your editor turns the table into

| :skull: |

and tml tables are always padded with spaces.

-- BirgitNietsch - 25 Jun 2015

White space management in the WysiwygPlugin is a significant minefield. I doubt anything will be done here for 1.2. What you can to is surround your custom markup with <sticky> tags. That will prevent TinyMCE from touching anything within the tags.

-- GeorgeClark - 25 Jun 2015

Perhaps. But, IMHO, angle brackets close to a smilie should not hinder the detection of a smilie. I think they should be treated like white spaces. Or is that impossible or having evil side effects?

-- BirgitNietsch - 26 Jun 2015

Workaround: I'm now using wiki variables instead of smilies.

-- BirgitNietsch - 24 Jul 2015

I'm going to flip this to needing a proposal. The use of HTML as an escape to TML rendering is intended operation. eg. <nop> as an escape, is actually implemented as any html tag prior to TML. A change in rendering of this magnitude would need careful consideration as it is likely to break a lot of existing topics.

-- GeorgeClark - 24 Dec 2015
 

ItemTemplate edit

Summary recognize smilies between html tags
ReportedBy BirgitNietsch
Codebase 1.1.9
SVN Range
AppliesTo Extension
Component SmiliesPlugin, FoswikiRender
Priority Enhancement
CurrentState Proposal Required
WaitingFor
Checkins
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x00Checkins
Release01x01Checkins
Topic revision: r8 - 24 Dec 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy