Since the new NBT data was changed I could use:
setblock ~ ~1 ~ command_block 0 replace {Command:"/say hi"}
But not when using it in a sign like this:
setblock ~ ~1 ~ standing_sign 12 replace {"Text1":"[{\"text\":\"test\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/setblock ~ ~1 ~ command_block 0 replace {Command:"/say hi"}\"}}]"}
It will see that there is a " and stop the command. Changing it to \" does not change this.
And I can't think of any fix for it. Someone else having problems with this?
You need to escape the quotes, backslashes = 2 * previous layer + 1
Previous layer = 1
2*1+1 = 3 backslashes.