Ask Your Question
0

disabling WYSIWYG for text cell in a worksheet

asked 2010-08-29 14:15:42 +0100

vdelecroix gravatar image

updated 2012-08-04 07:35:28 +0100

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 16:40:54 +0100 )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 19:10:56 +0100 )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 19:11:18 +0100 )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 19:12:09 +0100 )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 23:39:44 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2010-11-12 06:14:03 +0100

pang gravatar image

updated 2010-11-12 06:18:13 +0100

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 14:15:42 +0100

Seen: 674 times

Last updated: Aug 04 '12