1

I tried to install aloha editor for my webservice, and that turned into 2 questions:

  1. Why does the Format Plugin doesn't show me anything when i select
  2. Is there any Demo about the Save Plugin, i tried to use it, but required DummySave class, then I copied it from a repository, but still doesn't show me any button!

Hope someone can help!

Anthony Potts
  • 8,037
  • 7
  • 38
  • 54
Philipp Spiess
  • 3,123
  • 4
  • 23
  • 34

1 Answers1

2

The format plugin does indicate formated text when you place the cursor in it. For example if you place the cursor in a bold word, the bold button in the format plugin will be put in its active state. Are you experiencing any issues with this? Can you provide the content where the issue happens?


What save plugin are you refering to? You will always have to have some custom backend logic to save the contents of your form/editable to the database/file you want. Some time ago I wrote a small text on how to use the aloha editor in combinations with textareas. You will see how saving works in the example: http://www.supnig.com/blog/using-aloha-editor

You can also use the getContents() method on the editable you want to get the contents from. This would look something like this:

Aloha.getEditableById('content').getContents(); 
//where "content" is the id of your editable

or

Aloha.activeEditable.getContents() 
//if you want to get the content of the currently active editable. 
//ATTENTION: Editable must be active!

You can then add some javascript to send those contents to the server.

csupnig
  • 3,244
  • 1
  • 22
  • 22