Hey all!
I have the following code in the editor: <p><diashow></diashow></p> and I want to center the <diashow> tag by adding "text-align: center;" to the <p> tag (just to center it in the editor, front-end is done differently and doesn't matter ;)). Does anyone has any ideas how I can apply that action on the <p> tag from the commit function of the dropdown list in the diashow dialog?
I tried using diashowNode.getParent() to get the <p> tag and apply the center action somehow, but that doens't do anything.
Any ideas? :)
------------------------
EDIT - SOLVED
I added this to the commit function of the align dropdown list and that did the job:
var command = editor.getCommand( 'justifyleft' );
command.exec();
if (this.getValue() == 'center') {
var command = editor.getCommand( 'justifycenter' );
command.exec();
}