Questions about some odd behavior

Yakaru
Yakaru

Hi forum,

I've been experiencing some odd behavior that I wanted to ask about.

The first: I wanted a link to my campaign's wiki page from my front page. By all appearances my wiki page is "main-page" but when I do a link like [[main-page | wiki]] it wants to link to wikis/main-page/new instead of wikis/main-page -- is there a way to fix this other than making it a straight hardcoded URL?

The second: I'm getting some formatting weirdness with nested lists.In the wysiwig editor I just have a bullet then some subbullets and it looks correct. When I 'preview' it also looks correct. When I save though I get a "<br>" tag between my first and second <ul>. That is, in WYSIWIG's source window and preview I get this:


&lt;ul&gt;
&lt;li&gt;
ipso
&lt;ul&gt;&lt;li&gt;facto&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

And after saving I get this:


&lt;ul&gt;
&lt;li&gt;
ipso
&lt;br&gt;
&lt;ul&gt;&lt;li&gt;facto&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

... Which makes no sense to me whatsoever. What's going on!?

 

Thanks!

Comments

  • Yakaru
    Yakaru
    Posts: 4

    And apparently the code window doubly converted all my HTML tags. :-/ I'll reproduce here in just plain forum text:

    Preview:

    <ul>

    <li>

    ipso

    <ul><li>facto</li></ul>

    </li>

    </ul>

    Saved:

    <ul>

    <li>

    ipso

    <br>

    <ul><li>facto</li></ul>

    </li>

    </ul>

  • cgregory
    cgregory
    Posts: 780

    It needs to be Main Page not main-page

    [[Main Page | Wiki]]

     

    I don't use the WYSIWYG interface so I can't help there

     

    They are among us!

    image

                       XCom: Defiance - Campaign of the Month November 2016

     

     

  • Kallak
    Kallak
    Posts: 1,090

    I recommend staying in source mode with the CKEditor, as toggling in or out is what can cause the addition of tags or the creation of odd spacing. So for your nested list example, to get the more compact spacing, I would put all of the list tags on one line in the source mode of the editor like so:

    <ul><li>test1</li><ul><li>test2</li><li>test3</li></ul><li>test4</li></ul>

    Which then produces:

    • test1
      • test2
      • test3
    • test4
    All the best,
    - Kallak
  • Yakaru
    Yakaru
    Posts: 4

    Yeah, I've been doing a lot of editing in the source window but I have to go back and re-do all that formatting every time I edit the page since it goes to the WYSIWIG editor by default which re-applies the errors.

  • Kallak
    Kallak
    Posts: 1,090

    I'll have to do some testing on a dummy campaign to verify, but this might be something you can use custom CSS settings to help reduce the issue, having CSS rules for margins around paragraphs, list elements, etc..

    Let me do some messing around with it.

    All the best,
    - Kallak
  • Yakaru
    Yakaru
    Posts: 4

    Thanks Kallak, but since it's "injecting" a <br /> that I don't see in my source window or preview window but do see when I save and look at the data (and if I hit edit, is still not there), I'm not sure CSS can fix it. A <br /> is a <br />, regardless of style sheet.

  • cgregory
    cgregory
    Posts: 780

    When is a <br /> not a <br /> when your style sheet tells it not to display.

    You could tell your css to render a br differently for example


    div br {
    display: none;
    }

    in your case you might want li or ul instead of div, but the idea remains the same.

    if you post a link to the page giving you an issue we probably could tell you exactly the code to use.

    They are among us!

    image

                       XCom: Defiance - Campaign of the Month November 2016

     

     

Sign In or Register to comment.

September 2026
City of Shadows

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Discussions