Open dbitouze opened 7 years ago
According to https://www.google.com/search?client=safari&rls=en&q=span+tag+new+line&ie=UTF-8&oe=UTF-8#q=span+no+line+break the solution is to add some CSS:
white-space:nowrap;
I tried this CSS instruction but, as shown by the joined images, it doesn't give the expected result: still a line break where not wanted and not line breaks where wanted.
I think in the above screen shots your word "le" is wrapped by a p and then the snippet appears in its own p so you might need to specify the nowrap for the p tag instead of for body
It doesn't help: if nowrap
is specified for the p
tag, the previous part of the sentence is missing the line break between "de" and "production" (and the line break between "le" and the snippet still occurs).
I think the problem here is that storing snippets as Documents (pages) ends up wrapping them with a <p>
tag; that is something TinyMCE seems to be doing, even if you try to remove it.
Ah, if you edit the Document (Page) and change the Text field to type text/x-web-textile
you can remove the <p>
tag around the text and it saves correctly without the tag.
$ bin/instance -OSnippets debug
Starting debugger (the name "app" is bound to the top-level Zope object)
>>> from zope.component.hooks import getSite
>>> site = getSite()
>>> snippet=site['.snippets']['snippet-1']
>>> snippet.text.output
u'October 16, 2017'
>>>
With the following HTML code of a snippet I created:
le <span class="snippet-tag snippet-tag-document" contenteditable="false" data-type="snippet_tag" data-snippet-id="91703cee2a2b458dbe0c8103be2651d8">Snippet:[ID=91703cee2a2b458dbe0c8103be2651d8]</span>
the word "le" and the following snippet are not on the same line.