Jump to content

Post Table Uneditable


Recommended Posts

I've got a sheet template that I created, using one created by TiffanyKorta as a base.  In both Tiffany's sheet and the one I created, tables inside the post are not able to be edited outside the Source in any column after the first column.  As an example, in the sheet Tiffany created, at the very top is a table for Name, Nature, Essence, etc.  You can edit the data in the first column in the WYSIWYG editor, but you cannot edit the data in columns 2 or 3 unless you go into Source.  This is reproducable in both her sheet and mine (links to each are given below).

 

I copied her sheet to use as the base for mine by following the instructions bwatford created for quoting and copying a post, so I'm not sure if this has anything to do with this issue.

 

My Sheet:  Character Creation - Rules - Myth-Weavers

Tiffany's Sheet:  Tiff's Sheets - Homebrew - Myth-Weavers

Link to comment
Share on other sites

  • 1 month later...

OK, having finally had a chance to dig into this one for @TiffanyKorta and @Scarecrow71. The problem is the fieldsets are incorrectly built in source mode and are missing the containing div tag with the class mw-fieldset-body. While the resulting HTML is fully valid, the missing div means the content is not considered an editable region of the fieldset widget.

 

The fix is to change this:

<fieldset class="mw-fieldset">
	<legend class="mw-fieldset-legend"><a href="https://www.myth-weavers.com/showthread.php?t=530175#"><img data-loaded="true" data-ratio="8.33" data-src="https://i.ibb.co/1L50wdj/combat.png" src="https://test.myth-weavers.com/applications/core/interface/js/spacer.png" style="height:auto" width="1200"></a></legend>

	<table border="0" cellpadding="1" cellspacing="1" style="width:100%;">
		<tbody>
			<tr>
				<td>
					&nbsp;
				</td>
				<td style="width:40%;">
					<fieldset class="mw-fieldset">
						<legend class="mw-fieldset-legend"></legend>
						<div class="mw-fieldset-body">
							<p>
								Defense&nbsp;●○○○○
							</p>
						</div>
					</fieldset>
				</td>
				<td>
					&nbsp;
				</td>
				<td style="width:60%;">
					<fieldset class="mw-fieldset">
						<legend class="mw-fieldset-legend"></legend>
						<div class="mw-fieldset-body">
							<p>
								Soak (w/ Armor)&nbsp;●○○○○<span style="font-size:18px;"> </span>(●○○○○)
							</p>
						</div>
					</fieldset>
				</td>
			</tr>
		</tbody>
	</table>
</fieldset>

 

To this:

<fieldset class="mw-fieldset">
	<legend class="mw-fieldset-legend"><a href="https://www.myth-weavers.com/showthread.php?t=530175#"><img data-loaded="true" data-ratio="8.33" data-src="https://i.ibb.co/1L50wdj/combat.png" src="https://test.myth-weavers.com/applications/core/interface/js/spacer.png" style="height:auto" width="1200"></a></legend>
	<div class="mw-fieldset-body">
      <table border="0" cellpadding="1" cellspacing="1" style="width:100%;">
          <tbody>
              <tr>
                  <td>
                      &nbsp;
                  </td>
                  <td style="width:40%;">
                      <fieldset class="mw-fieldset">
                          <legend class="mw-fieldset-legend"></legend>
                          <div class="mw-fieldset-body">
                              <p>
                                  Defense&nbsp;●○○○○
                              </p>
                          </div>
                      </fieldset>
                  </td>
                  <td>
                      &nbsp;
                  </td>
                  <td style="width:60%;">
                      <fieldset class="mw-fieldset">
                          <legend class="mw-fieldset-legend"></legend>
                          <div class="mw-fieldset-body">
                              <p>
                                  Soak (w/ Armor)&nbsp;●○○○○<span style="font-size:18px;"> </span>(●○○○○)
                              </p>
                          </div>
                      </fieldset>
                  </td>
              </tr>
          </tbody>
      </table>
  </div>
</fieldset>

 

In about a dozen places using source mode. The initial WYSIWYG will look wonky, but you can check it in Preview mode and then save, and then everything should be hunky-dory.

Link to comment
Share on other sites

2 minutes ago, Scarecrow71 said:

Uck.  Is that the only solution?

You should be able to copy the post I fixed as a new baseline. Otherwise... well, you could go to source, copy it, paste it into an external editor of your choice, and do regex magic to find and fix all the places where you have </legend><table and </table></fieldset> to insert the requisite <div class="mw-fieldset-body"> and </div> tags, respectively.

Link to comment
Share on other sites

17 minutes ago, Eric said:

You should be able to copy the post I fixed as a new baseline. Otherwise... well, you could go to source, copy it, paste it into an external editor of your choice, and do regex magic to find and fix all the places where you have </legend><table and </table></fieldset> to insert the requisite <div class="mw-fieldset-body"> and </div> tags, respectively.

Blech.

 

What about new posts from this point on?  Same fix?

Link to comment
Share on other sites

I'm not sure I understand the question, but I'll take a stab.

 

If you want to have editable content in a fieldset, you definitely have to have the <div class="mw-fieldset-body"></div> tags going forward. Those are inserted by the fieldset button by default, so as long as you don't edit them out using source mode, everything will work. It's possible Tiff did it on accident due to the fieldset editing bug (which is now fixed!) that was affecting use of fieldsets in the WYSIWYG editor; but if it was done purposefully--e.g., she didn't like the style of the div--source mode should now allow adding some style attributes to divs to control that behavior, too.

Link to comment
Share on other sites

I think the original issue was a copy pasted fieldset from another source (maybe ogmw) that formatted the wrong way as fieldsets created with the editor have the proper div tags. 

 

Again, that same issue of inproper html not being up to standard.

 

Any fancy templates need to be created in Baldr from the start and not copy/pasted from ogmw for that reason. If created originally in Baldr then none of these issues exist.

Link to comment
Share on other sites

5 hours ago, TiffanyKorta said:

On an unrelated note will we have image resizing copy across at some point?

Why can't, when you copy and paste, it save the dimensions you've listed in the original image?  Or is that just not a thing?

The clone post will work.  That's mostly what I do on the other forum for my 'posting format' (though, there its quote and remove the quote tags and 'old' post information back to the base format)

Link to comment
Share on other sites

1 hour ago, TiffanyKorta said:

Actually it was done all in Baldr, with a few source changes to make it all % rather than fixed width.

That might do it, the reason it could not be edited is because Baldr no longer recognized the fieldsets for what they were. The amount of html you can change in the source is limited to the format the editor uses if they are going to be edited outside the source again or otherwise it won't recognize them.

 

It's a learning curve for sure, something we all will figure out by trial and error as far as what can be hacked in and still function in the editor.

Link to comment
Share on other sites

42 minutes ago, Papa Bear said:

Why can't, when you copy and paste, it save the dimensions you've listed in the original image?  Or is that just not a thing?

The clone post will work.  That's mostly what I do on the other forum for my 'posting format' (though, there its quote and remove the quote tags and 'old' post information back to the base format)

I think that is more to do with the browser clipboard not picking up the sizes than anything else.  If I copy from Baldr and paste into MSWord it does the same exact thing, so I don't believe it is a pasting issue with Baldr itself. It may not have a way to pick up image size tags.

 

@Eric 

 

Might be able to fix this issue in the CKEditor filter with something like this...

 

allowedContent: {
    img: {
       styles: 'height, width'
    }
}
Link to comment
Share on other sites

×
×
  • Create New...