rationbook wrote:I just spent a couple of hours on pretty much exactly the same problem. Turns out I'd missed the class
wymupdate off the forms submit button.
ie. the update button should look something like this...
- Code: Select all
<input type="submit" value="Update" name="formupdate" class="wymupdate">
rationbook - thanks for the reply
I don't think that that seems to be the problem for me. Here is the relevant HTML
- Code: Select all
<textarea style="display: none;" name="ftext" cols="45" rows="10" id="ftext" class="wymeditor">
<input name="submit" value="Create comment" class="wymupdate" type="submit">
(note that the style="display: none;" is generated, rather than in my code)
And here is my jquery function:
- Code: Select all
$(function() {
$('.wymeditor').wymeditor({
containersHtml: '',
classesHtml: '',
updateSelector: "submit",
updateEvent: "click",
toolsItems: [
{'name': 'Bold', 'title': 'Strong', 'css': 'wym_tools_strong'},
{'name': 'Italic', 'title': 'Emphasis', 'css': 'wym_tools_emphasis'},
{'name': 'InsertOrderedList', 'title': 'Ordered_List', 'css': 'wym_tools_ordered_list'},
{'name': 'InsertUnorderedList', 'title': 'Unordered_List', 'css': 'wym_tools_unordered_list'},
{'name': 'Undo', 'title': 'Undo', 'css': 'wym_tools_undo'},
{'name': 'Redo', 'title': 'Redo', 'css': 'wym_tools_redo'},
{'name': 'CreateLink', 'title': 'Link', 'css': 'wym_tools_link'},
{'name': 'Unlink', 'title': 'Unlink', 'css': 'wym_tools_unlink'},
{'name': 'InsertImage', 'title': 'Image', 'css': 'wym_tools_image'},
{'name': 'InsertTable', 'title': 'Table', 'css': 'wym_tools_table'},
{'name': 'ToggleHtml', 'title': 'HTML', 'css': 'wym_tools_html'},
{'name': 'Preview', 'title': 'Preview', 'css': 'wym_tools_preview'}
]
});
});
Note that I'm not even certain that updateSelector and updateEvent are required, but it doesn't seem to work with or without them
Which brings me to a nagging concern regarding what you have suggested as the problem. Granted, my js skills are not particularly strong, but making behavior dependent on the assignment of a class to an element - to the exclusion of assigning behavior to the element type - seems at best unusual.