Re: Prevent linebreaks in inline elements

Christian Stocker <[email protected]> Mon, 15 Nov 2004 09:17:55 -0800
Newsgroups gmane.editors.bitflux.general
Message-ID <[email protected]>
Hi

On 15.11.2004 1:28 Uhr, Niklas Therning wrote:
> Hi,
> 
> I'm new to BXE and so far it has served me well. I've run into a small 
> problem regarding linebreaks:
> 
> In my RelaxNG I have an element, inline, which may only have text content:
> 
> <element name="inline">
>    <attribute name="id"/>
>    <text/>
> </element>
> 
> The problem is that when I hit enter in the editor a new <p> will be 
> created and whatever was in the <inline> before will be wrapped in 
> another <p>. Is there any way I can prevent this behaviour?

I assume, your XML looks something like this:

<root>
   <p>foobar <inline>hello world</inline> </p>
</root>

and if you hit enter in <inline>, then you should get

<root>
    <p>foobar <inline>hello</inline></p>
    <p><inline>world</inline></p>
</root>

At least, that happens, when I hit return on inline elements in the demo.

Can you tell me, what you get in your situation? And what do you expect 
to happen? (I'm not sure, what *should* happen, maybe you have a good idea)

Another good thing would be to send me a shortest possible example. Your 
XML, your CSS and your RelaxNG, maybe also the config file. Then I can 
try to reproduce this.

chregu



> 
> The editor seems to know that <p> isn't allowed as a child of inline 
> since I get an error message when saving: p is not allowed as child of 
> inline.
> 
> I'm using 0.9.6 in Debian unstable version of Firefox 1.0.
> 
> Regards,
> Niklas Therning
> 

-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch  |  [email protected]  |  gnupg-keyid 0x5CE1DECB

-- 
bx-editor-users mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-users