<img> tags outside <p>

Kae
Posts: 12
Joined: Tue Apr 01, 2014 9:39 am

<img> tags outside <p>

Post by Kae »

Is there a way to insert an image outside a <p> tag? Currently, there always has to be a <p> tag before an image can be inserted.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: <img> tags outside <p>

Post by sorin_ristache »

Hello,

In an XHTML file you can insert an <img> element for example in a <body>, in a <li> (inside an <ul> or <ol>), in a <dd> or <dt> (inside a <dl>). You can insert the <img> element using the content completion assistant either in the Text editing mode or in the Author editing mode.

What XHTML code did you try? Where do you want to insert an <img> element?


Regards,
Sorin
Kae
Posts: 12
Joined: Tue Apr 01, 2014 9:39 am

Re: <img> tags outside <p>

Post by Kae »

I see. I am currently trying to insert an <img> tag within a <content> tag, which is a custom tag defined in an .xsd we're using, though it should be insertable in other tags as well.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: <img> tags outside <p>

Post by sorin_ristache »

So that is not an XHTML file? What schema is that? Did you create a custom XSD schema? Where (in what elements) does your XSD schema allow an img element?

If you associate the XSD with the edited XML file using the toolbar action called Associate Schema (also available on menu Document -> Schema) then Oxygen will display all the elements allowed by the schema at the current cursor position with the help of the Oxygen content completion assistant (available in both Text editing mode and Author editing mode).


Regards,
Sorin
Kae
Posts: 12
Joined: Tue Apr 01, 2014 9:39 am

Re: <img> tags outside <p>

Post by Kae »

It is a custom xsd schema, and the schema allows for insertion of an img tag anywhere.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: <img> tags outside <p>

Post by sorin_ristache »

Is the XSD schema ssociated with the edited XML document? What is the schema declaration that associates the XSD schema with the XML document? What does the validation operation say? Does it list any validation errors in an errors view at the bottom of the Oxygen window when you press the Validation button on the toolbar?

Can you post some samples here of your XML file and XSD schema for testing them?


Regards,
Sorin
Kae
Posts: 12
Joined: Tue Apr 01, 2014 9:39 am

Re: <img> tags outside <p>

Post by Kae »

OK, I will send the samples via email to support@oxygenxml.com.
Post Reply