tinyMCE strips out empty span tags

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
9/5/2012 2:59:56 PM
Gravatar
Total Posts 199

tinyMCE strips out empty span tags

I am using version 2.3.9.0 with tinyMCE and when using the HTML editor I am adding an advance navigation list to the left side that contains span tags.

If I add the following then save it tinyMCE will strip everything inside the <li>

BEFORE:

<li><span class="qmdivider qmdividerx">   </span></li>

AFTER SAVE

<li></li>

I think there is a way to specify valid elements but I am not sure how to do this is the config file or if it is even possible so any help is appreciated.

9/5/2012 3:15:55 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: tinyMCE strips out empty span tags

Assuming you prefer TinyMCE over CKEditor, you could use the workaround of going into the instance settings and unchecking the "Use WYSIWYG Editor" box. Then you would just have a raw HTML editor to make changes to that instance, and no code stripping would occur.

9/6/2012 5:41:14 AM
Gravatar
Total Posts 199

Re: tinyMCE strips out empty span tags

Thanks Jamie, CKEditor does not strip out empty tags and does work great, but I do like tinyMCE and was hoping to just add some valid elements so I can keep using tinyMCE.

 

I guess my underlying issue is I want sub navigation to display for a particular page that  I am on and when I use the site vertical nav It seems that you can not limit that left nav to only show sub/child pages of the section you are on.  If you have any ideas that would be appreciated.

9/6/2012 7:06:59 AM
Gravatar
Total Posts 199

Re: tinyMCE strips out empty span tags

I did some looking around and found a good solution with the PAGEMENU control

  <portal:PageMenu id="PageMenu1" runat="server" UseTreeView="false" Direction="Vertical" />

I am just going to take some time and style it the way I want, but it looks like the way to go for me.

I think it would be great idea if there were some pre-built styles for horizontal and vertical menus available on the mojo site for download.  Possibly just multiple versions of stylemenu.css just to get you going with different menu styles quickly.

9/6/2012 7:14:56 AM
Gravatar
Total Posts 108
Community Expert

Re: tinyMCE strips out empty span tags

You alredy have many examples for styling the menu. Go to http://mojoportal.codeplex.com/releases/view/91295 and download the extra-skins.zip there are many skins using vertical menu. 

9/6/2012 2:40:18 PM
Gravatar
Total Posts 18439

Re: tinyMCE strips out empty span tags

span is certainly a valid tag. Possibly its a bug in TinyMCE that only happens in lists. If you've upgraded mojoPortal over time, you probably have older versions of TinyMCE on disk and you could switch back to an older version by editing this in web.config and pointing it to one of the older versions that you may find under /ClientScript

<add key="TinyMCE:BasePath" value="~/ClientScript/tiny_mce356/"/>

possibly this bug doesn't exist in other versions of TinyMCE

please only post one question per thread, the menu quesiton should have been on its own thread as it is not related to the subject of this thread.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.