Fork me on GitHub
Current releases are 2.1 (gold) and 2.0.18.11 (security patch for 2.0)
Ready for 2.1? Find out if your favorite plugins are compatible.
The 2.0 branch will no longer receive updates after Dec 2014.

Redactor Editor Plugin

XarcellXarcell
edited June 2012 in Vanilla 2.0 Help

I'm a complete noob to Vanilla. The only thing stopping me from making the switch is the editor. So now I'm trying to make a editor plugin, and I'm not having much luck. My PHP knowledge is limited...

I have everything for my plugin ready, the images, files, etc. However, I need to be able to change

This: <textarea id="Form_Body" name="Comment/Body" rows="6" cols="100" class="TextBox"></textarea>

To This: <textarea id="redactor_content" name="comment" rows="6" cols="100" class="TextBox"></textarea>

Any suggestions and examples of how I can accomplish this?

Thanks.

Best Answer

  • x00x00 MVP
    edited June 2012 Answer ✓

    one of the key things the live load, as comment editbox are loaded asynchronously.

    $('.TextBox').livequery(function(){
          $(this).redactor();
    }
    

    One of the problem is that as the form is loaded in place, when editing you can have severall Form_Body id which is technically illegal, but hey ho.

    Some editor rely of the id so this a problem, there is a workaround, but it can break other plugins, and css that rely on that id not being unique.

    I'm hoping that is not the case with redactor. It seem to support multiple editor out of the box.

    grep is your friend.

«1

Answers

«1
Sign In or Register to comment.