Open prazvan opened 8 years ago
Great! Thanks Razvan. I had noticed that bug on a recent project but not investigated it.
Would you like to make a pull request to commit that change? If you are not experienced with this, this might be a good opportunity to have a go
@sheadawson will do that asap :)
I just made this edit to shortcodable.js and it does fix the 'edit HTML source not saving' issue but breaks the saving of the inserted shortcode dataobject.
Now when I publish the page the embeded shortocde dataobject shows on the frontend as an image i.e. they are no longer being converted into shortcodes on save.
When I look in the database they are stored as the image and not being saved as e.g [myObject id="2"]
Same for me.
The fix @MrJamesEllis pushed does not fix #52 or #49 for me. A shortcode does not even need to be present on the page for the HTML Source editor to ignore the changes made. I rolled back to version ^2.0 and noted that I was able to edit the content via the HTML Source editor if I finish my edits, then open and close the HTML source editor again before attempting to save. This doesn't appear to work for ^3.0
@jules0x I only applied the change to the 2.0 branch as that satisfies my SS version requirement. Does the change fix the issues referenced for you in 2.0 ?
The only side-effect I've had reported is that navigating away from an admin form including the HTMLEditorField with a shortcode, causes the "Changes that you made, may not be saved" alert.. when no changes were made to the field.
@MrJamesEllis I just tried adding the changes in f9466d8 to the 2.0.9 branch and no, I get the same behaviour. Edits to the htmlsource editor are lost on save, and when switching between pages, content is transferred between the two. My solution is likely to be removing the default html source editor button and implementing a separate html editor at a later date.
Hey,
So i found a weird bug when using the module with HTML Edit source.
Lets say that after you add a shortcode from the module our you want to add it manually when editing the html source, when you try to save the page as draft or published the content won't be save.
After a bit of debugging found a solution
in the shortcodable.js file
under the onbeforesubmitform callback i found out the the Editor save method wasn't called at all.
Thanks, Razvan