I tried to install aloha editor for my webservice, and that turned into 2 questions:
- Why does the Format Plugin doesn't show me anything when i select
- Is there any Demo about the Save Plugin, i tried to us开发者_C百科e it, but required DummySave class, then I copied it from a repository, but still doesn't show me any button!
Hope someone can help!
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.
精彩评论