Currently, based on a language selection on a separate drop down, I can attach redactor to a text field and use the language direction from the selected language like this:
this.$('#description').redactor({
buttons: ['formatting', 'bold', 'italic', 'underline'],
breakline: true,
direction: this.direction,
...
});
However, if I change the language in the drop down, I would like to dynamically change the direction of my redactor field. If I try the following, it does not work:
this.$('#description').redactor({direction: this.direction});
Does anyone know the correct way of doing this?
This code:
will never work because you need to start/stop redactor app. Hence the code can be:
Another solution can be: