0

When I create a Global Data Type for localizable content in user controls I run into the problem that C1 always surrounds plain text with

<p></p>

I don't want that if the content is just meant to be inside a link for example, but still has to contain html. Even if I use the code view of the Visual Editor, C1 will readd the tags e.h. if I translate the data.

Is there a way to stop C1 from automagically adding html to my string data when using the visual editor?

Community
  • 1
  • 1
magnattic
  • 12,638
  • 13
  • 62
  • 115

2 Answers2

1

I suggest you leave the editor as it is and keep on storing your html as valid xhtml documents, and instead handle this when rendering. Not having custom features/design permeate the way you store data could also be a plus in the long run.

One way to achieve this is with XSLT as described in this article "How can I modify the HTML from the Visual Content editor?" - you can also do this with C#.

mawtex
  • 1,564
  • 1
  • 12
  • 21
0

There has been a few reports of this undesired behavior, but unfortunately its by design. You could argue if ts Composite C1's fault or the underlying TinyMCE editor, but maybe you can tweak the configuration of it. Or wrap the functions that output the content with a xslt-template that will strip out the p's.

See these discussions for further explanations.

TinyMCE Config Change - Force P False

Visual editor adding p tag automatically

Pauli Østerø
  • 6,878
  • 2
  • 31
  • 48