Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Very alpha: CKEditor in Vanilla 2
So I've uploaded my very alpha CKEditor plugin. Not as much work as I'd feared, it only required two modifications to Vanilla 2 proper:
Anyway, the changes can be seen in this commit here: http://github.com/LouisStAmour/Garden/commit/c1ba39dbb3ee53671f4bb229de6799fc901dd092
As coded, this plugin might or might not be compatible with Vanilla Replies or VanillaCommentScore as I encountered an error at one point and disabled both of them, though it might be the JS' fault.
Also, @Mark, is it possible to override JS or CSS from within a plugin, avoiding the need to remove 'discussion.js' just to add it again with a slightly different name? Or should we work on making the JS more extensible? The main incompatibility lies within jQuery's serialize() of the form, which doesn't seem to call the textarea's overridden val() to get the CKEditor's changes and so instead saves the original unmodified textarea that was hidden. One alternative could be a trigger for such changes before serializing the form.
Oh and another change I've forgotten to make is to ensure all IDs are unique for textareas. (Right now they totally aren't, so my start.js overcomes that as necessary.) And to swap to using Google for hosting jQuery, though that could be part of future performance optimizations like 1.2 has received, I guess.
- The nl2br regex in the Html() formatter should have a config option
- There should be a RemoveJsFile method to complement the AddJsFile method.
Anyway, the changes can be seen in this commit here: http://github.com/LouisStAmour/Garden/commit/c1ba39dbb3ee53671f4bb229de6799fc901dd092
As coded, this plugin might or might not be compatible with Vanilla Replies or VanillaCommentScore as I encountered an error at one point and disabled both of them, though it might be the JS' fault.
Also, @Mark, is it possible to override JS or CSS from within a plugin, avoiding the need to remove 'discussion.js' just to add it again with a slightly different name? Or should we work on making the JS more extensible? The main incompatibility lies within jQuery's serialize() of the form, which doesn't seem to call the textarea's overridden val() to get the CKEditor's changes and so instead saves the original unmodified textarea that was hidden. One alternative could be a trigger for such changes before serializing the form.
Oh and another change I've forgotten to make is to ensure all IDs are unique for textareas. (Right now they totally aren't, so my start.js overcomes that as necessary.) And to swap to using Google for hosting jQuery, though that could be part of future performance optimizations like 1.2 has received, I guess.
0
Comments
Was just wondering if I were to enable other toolbar options, would the plugin fail? I'm talking formatting ones here rather than uploads. And second point, I don't seem able to locate the toolbar options config anywhere, a nudge in the right direction would be awesome.
Regards.
Edit: Seems I was doing it right the first time. Have toolbar config changes been disbaled in some way (either intentional or otherwise) or do they just not work?
Oh and how should I handle regular links that aren't oEmbed enabled? Should I allow the embedded objects to be edited, and if so, that'll require potentially more changes to Vanilla for display. Or should I assume JavaScript as a requirement both to view and to edit this? Should there be other post "types" in the forum, such as for video, etc.?
If you want to post another alpha with the oEmbed included in it I'd certainly be willing to take a look and give some feedback.
I'm also showing off a multitouch screen I just finished, and I've a two more projects and an exam in the next month. I should have more time, or at least upload what I have for oEmbed, in April. Remind me here or send me an alert on Twitter, where I'm @4lou.