Page 1 of 1

<img> tags outside <p>

Posted: Tue Apr 08, 2014 5:01 am
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.

Re: <img> tags outside <p>

Posted: Tue Apr 08, 2014 9:59 am
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

Re: <img> tags outside <p>

Posted: Tue Apr 08, 2014 12:29 pm
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.

Re: <img> tags outside <p>

Posted: Tue Apr 08, 2014 12:44 pm
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

Re: <img> tags outside <p>

Posted: Thu Apr 10, 2014 12:54 pm
by Kae
It is a custom xsd schema, and the schema allows for insertion of an img tag anywhere.

Re: <img> tags outside <p>

Posted: Thu Apr 10, 2014 1:06 pm
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

Re: <img> tags outside <p>

Posted: Fri Apr 11, 2014 6:28 am
by Kae
OK, I will send the samples via email to support@oxygenxml.com.