Ask Your Question
0

disabling WYSIWYG for text cell in a worksheet

asked 2010-08-29 07:15:42 -0500

updated 2012-08-04 00:35:28 -0500

Hello,

The html code produced by the WYSIWYG interface for text cells in notebook worksheet is ugly and sometimes not at all what you expect! As examples

  1. if you use several times bold/unbold then you get nested "<b></b>" in the HTML code
  2. there is no way to use the tags "<div> </div>" and "<span> </span>". It is impossible to defined styles at the beginning of the worksheet
  3. if you edit by hand the worksheet (after a click on edit), it can happen that the application erase what you did!
  4. ...

Is there an easy way to disable this WYSIWIG interface and get a simple textarea with raw html input?

The sort of things I would like to do is as in the following worksheet... (I know yet that the color are not very fancy).

Thanks, Vincent

edit retag flag offensive close merge delete

Comments

Could you give an example(s) of the erasure? TinyMCE has settings that we *may* be able to adjust to give the desired behavior.

Mitesh Patel gravatar imageMitesh Patel ( 2010-08-29 09:40:54 -0500 )edit

example1: write two text cells with no math cell in between... after a new edit, sometimes it becomes one cell sometimes it stays two.

vdelecroix gravatar imagevdelecroix ( 2010-08-29 12:10:56 -0500 )edit

example2: if you write at the top of your file "<style> background-color: green;</style>" and then edit a text cell at the top. Sometimes the style is pushed below sometimes it stays above!

vdelecroix gravatar imagevdelecroix ( 2010-08-29 12:11:18 -0500 )edit

Oups! there was something between the two " " which was some html style command... ask.sagemath.org hid them!

vdelecroix gravatar imagevdelecroix ( 2010-08-29 12:12:09 -0500 )edit

Two consecutive text cells always become one text cell when the notebook is saved and reloaded---the Sage file format is just that everything between input cells is a text cell. While editing and creating cells, you might still see two until you close the worksheet, though.

Jason Grout gravatar imageJason Grout ( 2010-08-30 16:39:44 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2010-11-11 23:14:03 -0500

pang gravatar image

updated 2010-11-11 23:18:13 -0500

Many students of mine just place comments on the cells:

  • Start with #, and forget about the text areas.
  • don't put the #, but don't eval the cell.
  • '''place the whole comment among trilpe quotes''' (I don't like this one, but be my guest)

I've seen other people in sagenb start code cells with %html or %latex, and put their code there:

  • Use of %latex will require that you have latex installed, and will print an image below the cell when you eval it.
  • Use of %html will output the code as html, which means you have to use tags like <p></p>, or otherwise your line breaks will dissappear from the output. But on the other hand, you can use $ for latex snippets, and they get compiled into jsmath.
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2010-08-29 07:15:42 -0500

Seen: 400 times

Last updated: Aug 04 '12