• ResolvedPlugin Contributor Azragh

    (@azragh)


    I just recognized that I can’t save posts / pages in visual view anymore without loosing my markup. This is very crucial – I use the plugin on about 200 websites, where I let the customer edit single parts via the visual editor. Is there any chance for a fix?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author J-Ro

    (@j-ro)

    @azragh I’m not seeing issues with latest wordpress on my sites, maybe there’s an interaction with another plugin? Feel free to submit a PR too with changes if you’d like: https://github.com/j-ro/Preserved-HTML-Editor-Markup

    Plugin Contributor Azragh

    (@azragh)

    The only other plugin activated is Classic Editor. I’ve tested it on a local, blank WP installation with the twentytwentyone theme so I think you should be able to reproduce that. The problem is, I’m not really a programmer – I am only a full stack developer with basic knowledge of PHP and JS – my last PR was kind of a stroke of luck..

    I would really appreciate it if you could take a look at this.

    Edit: Just recognized something new: It only happens, when you don’t edit something in the visual tab – you have to edit something in text view, change to visual and save. If you then switch back to the text tab markup is gone. Weird thing is, if you then press F5 the markup is there again ..

    • This reply was modified 3 years, 2 months ago by Azragh.
    Plugin Author J-Ro

    (@j-ro)

    Unfortunately I’m unable to reproduce, and this is a volunteer project, so if you’d like to fix it, whatever it is, I think you’ll have to fix it.

    Plugin Contributor Azragh

    (@azragh)

    I was told by my programmer that the error description must have been misunderstood due to my poor English. By “markup gone” I mean that the “structuring” in the markup is lost. All linebreaks and indents in the HTML text are removed. The HTML tags themselves remain.

    As it looks, however, this is only the case in local development environments (XAMPP). I’ll take a closer look when I find the time.

    Plugin Author J-Ro

    (@j-ro)

    Ah, gotcha — that is not a feature this plugin offers then, we do not preserve things like that, only preserving the tags themselves (so the display is right).

    Plugin Contributor Azragh

    (@azragh)

    But if I have only activated the Classic Editor, the line breaks remain? As far as I understand, the functions “fix_post_content” and “fix_wysiwyg_content” in the PHP file also deal with the preservation of line breaks…

    But anyway, since the problem only occurs locally after several tests, I can live with it, although I wonder what the difference is to a normal server environment (XAMPP / PHP is up to date).

    The only thing that still worries me a bit is this error message: “Deprecated TinyMCE API call: <target>.onNodeChange.add(..)”, since this function also occurs in the plugin code.

    Plugin Author J-Ro

    (@j-ro)

    As I said, this plugin does not attempt to preserve line breaks, that is not its function.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Saving in visual view kills markup’ is closed to new replies.