I have the following code:
<textarea class="content">
[row]
[col-md-12]
text
[/col-md-12]
[/row]
[row]
text
[/row]
</textarea>
Now I want to add the [col-md-12] inside (directly after) the [row] and close it before the [/row] with jquery. This should be the result:
<textarea class="content">
[row]
[col-md-12]
text
[/col-md-12]
[/row]
[row]
[col-md-12]
text
[/col-md-12]
[/row]
</textarea>
(Note: The code above is not bootstrap! I just took bootstrap, because its more clear, that the "col-md-12" is needed!)
Here is a jsfiddle example of the current code: http://jsfiddle.net/Zoker/6mzrj1e7/
Now after "converting" there is a '[vc_column width="1/1"]' missing inside the first '[vc_row]' and a '[/vc_column]' before the closing '[/vc_row]'. And thats the shortcode I need to add. I dont know how to proof, if its missing and add it then...
Also I have to click 3 times on the button to get the content completely updated. How can I make it work after 1 click? (edit: that one fixed with https://stackoverflow.com/a/1145525/2977288)