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.

jQuery WYSIWYG: Incompatabilites

zodiacdmzodiacdm
edited July 2010 in Vanilla 2.0 - 2.8
Great Idea for a plugin, however, the form that apparently replaces the original comment form is not compatible with either of the 2 different quote plugins.

The Quotes plugin appears to redirect to the top of the page, instead of the bottom, with the quote not appearing, and the Quote Selection plugin redirects to the form, however the quote still does not appear.

Any chance on seeing a compatible version in the future?
Tagged:

Comments

  • TiGRTiGR
    edited July 2010
    @rak, maybe you could just add bi-directional sync for these feilds? Such as
    $("#realtextarea").change(function() { $("#wysiwyg").value($(this).value()) }
    $("#wysiwyg").change(function() { $("#realtextarea").value($(this).value()) }
    What do you think?

    And possibly even more:
    $("#realtextarea").focus(function() { $("#wysiwyg").focus() }
  • ToddTodd Chief Product Officer Vanilla Staff
    @rak, is this plugin up on github by any chance? I think it would be great for plugin developers to put their plugins up with a link to the repo on the plugin page so others can contribute too.
  • @Todd what's the chance of an official WYSIWYG plugin being released from you guys? It's a necessity for a lot of forums.
  • ToddTodd Chief Product Officer Vanilla Staff
    I think I'd like to try helping with the plugin @rak made first. Even if we were to do an official wysiwyg plugin, we would be integrating a standard OS wysiwyg library rather than building our own.
  • @TiGR @Todd @Ron: Thanks for the comments guys! I haven't really tried the quote plugins - only as far as seeing that they don't work with jwysiwyg.

    The plugin only lives here under Addons, I haven't looked at putting it on Github. As the Addon is just a simple tweak/extension of http://github.com/akzhan/jwysiwyg I'm not sure what the practical/legal/tech requirements are of putting a plugin based on another script are. Is it called a 'fork'? or a separate project?

    If you want to see if you can come up with a fix for your issues using Quote/Selection plugins, I'm happy to roll them into the release version.

    @TiGR: did the jquery fixes you posted above work?

    There are other issues people are seeing too: http://vanillaforums.org/discussion/12308
  • ToddTodd Chief Product Officer Vanilla Staff
    edited July 2010
    jwyiwyg is dual licensed under GPL and MIT which means you can choose whichever license you want, just like jQuery. The MIT license is pretty much the least restrictive license out there. Its terms are basically, "take it and do whatever you want."

    That being said, if you do find a bug in it you should try and contact the authors with the fix as I'm sure you would anyway.

    I think your plugin isn't exactly a fork of jwysiwg since you are probably leaving their library intact and just writing an adapter for it to plug in to Vanilla 2. Forking usually refers to you changing their source code. If you were to fork using github you would end up adding stuff the authors probably don't want.

    If you want to include jwysiwg from github directly into your project you could embed it with an external repository. I would try just copying their code first, like you've done now.

    No problem if you haven't used git before and don't want to tackle the learning curve. I'm just so in love with git that I want everyone to use it. It is the best source control system there is and is built exactly for the type of development we all do.

    It's a little difficult to get running on Windows and has a few different paradigms from other source control systems, but once you get up to speed it's just so good for managing projects being worked on by different people all over the Internet.
  • @Todd: Thanks for the tips! I'll see if I can put something up over the weekend. I guess I'll have to choose a different name for it also if it goes on Github?

    At the moment, the Vanilla Addon doesn't work with the latest jwysiwyg on github (v0.92) - only with the older v0.8.

    Does anyone know if the Vanilla team is working on their own wysiwyg solution? I'd imagine it's quite a common request.

    I picked the jwysiwyg as it was the simplest looking from this list, http://www.queness.com/post/212/10-jquery-and-non-jquery-javascript-rich-text-editors -- Maybe one the others would work better?

  • ToddTodd Chief Product Officer Vanilla Staff
    We aren't working on our own solution. I was thinking of integrating with the CKEditor because its predecessor was popular in Vanilla 1.
  • RonRon New
    edited July 2010
    @Todd CKeditor would be absolutely amazing if you can integrate that into a Vanilla 2 plugin. And your comment was very informative thank you.

    @rak great work on the plugin.
  • edited August 2010
    to get quoting to work (the quoteselection plugin), open the quoteselection.js file, find the lines that say
    $("#Form_Body").val(body + quoteSelection.getQuoteText()).focus(); $("#quoteButton").hide();

    and change them to $("#Form_Body").val(body + quoteSelection.getQuoteText()).focus(); $('#Form_Body').wysiwyg('insertHtml', quoteSelection.getQuoteText() + '<br />'); $("#quoteButton").hide();
  • rakrak
    edited August 2010
    All: Please try this new wysiwyg plugin using CLEditor: http://vanillaforums.org/addon/599/cleditor
  • CLEditor is not as clean as this one for me.

    jQuery WYSIWYG works fine but it fails only in Conversations, where HTML code is displayed sometimes.

    In discussions its working fine, but in Conversations replies sometimes HTML code appears without sense (some DIVs, some BR...).
  • Could I choose where jQuery WYSIWYG plugin is active?

    I mean disable it only for Conversations.
Sign In or Register to comment.