We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to implement two versions of the Redactor text-editor in my rails app with different config files. How can this be achieved?
The text was updated successfully, but these errors were encountered:
I found a temporary solution by determining the controller from the url path all with jquery. Once the controller is determined,
function Getcontroller() { var controller = window.location.pathname.split('/')[1]; return controller } $(document).ready(function() { controller = Getcontroller() if (controller == 'users') { config_1() } else { config_2() } }); function config_1() { redactor config_1 here } function config_2() { redactor config_2 here }
Sorry, something went wrong.
How can I use two different configs in one Controller? For example, one for post, and another for comment.
untested, but could you not have a different class identifying the textarea and two different JS calls to redactor them:
$('.redactor-simple').redactor( { buttons: [ 'formatting', 'bold', 'italic', 'unorderedlist','orderedlist','link','underline'] } ); $('.redactor-really-simple').redactor( { buttons: [ 'underline'] } );
No branches or pull requests
I want to implement two versions of the Redactor text-editor in my rails app with different config files. How can this be achieved?
The text was updated successfully, but these errors were encountered: