First time here? Check out the FAQ!

Ask Your Question
0

disabling WYSIWYG for text cell in a worksheet

asked 14 years ago

vdelecroix gravatar image

updated 12 years ago

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

Preview: (hide)

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 ( 14 years ago )

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 ( 14 years ago )

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 ( 14 years ago )

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

vdelecroix gravatar imagevdelecroix ( 14 years ago )

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 ( 14 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 14 years ago

pang gravatar image

updated 14 years ago

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.
Preview: (hide)
link

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: 14 years ago

Seen: 685 times

Last updated: Aug 04 '12