Sign in

HTML code editors removes code!

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #767
    RKR

    I noticed that some code is not saved. For instance <style></style> will not ba saved.

    I tried adding <p>test</p> and that was saved just fine.

    #768
    RKR

    Okay, <span class=”tagcolor”><</span>link<span class=”attributecolor”> rel<span class=”attributevaluecolor”>=”stylesheet”</span> type<span class=”attributevaluecolor”>=”text/css”</span> href<span class=”attributevaluecolor”>=”mystyle.css”</span></span><span class=”tagcolor”>> won’t get saved neither!</span>

    #769
    RKR

    Sorry, I can’t add the code that it won’t save it seems that this forum too has bugs.

    #776
    Tomasz DziudaTomasz Dziuda
    Moderator

    Hi,

    I suppose that your issue is caused by fact that TinyMCE editor removes some tags.

    You can try to override editor config: https://getpublii.com/dev/how-to-add-custom-config-or-js-for-post-editor/

    You should use something like this:

    {
       extended_valid_elements: '*[*]'
    }

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #800
    enslaved2dieenslaved2die

    I have a similar issue, I want to use the google model viewer.

    I dont have a clue how to properly use the editor overide config.

    Can you provide more examples?

    This is how my tinymce.override.json looks like:

    {
    extended_valid_elements : "model-viewer[class|src|ios-src|background-color|alt|camera-controls|auto-rotate]"
    }

    #804
    Tomasz DziudaTomasz Dziuda
    Moderator

    @enslaved2die – I have provide you an example:

    {
    extended_valid_elements: '*[*]'
    }

    It will allow any element – if you will override the extended_valid_elements as you wrote, you will broke other tags which are defined by default by Publii.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #805
    Tomasz DziudaTomasz Dziuda
    Moderator

    Alternatively – extend this list: https://github.com/GetPublii/Publii/blob/master/app/src/components/configs/postEditor.config.js#L9

    But then you will have to update it with every Publii update.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #894
    enslaved2dieenslaved2die

    I cant get it to work. I dont know what Im doing wrong here.

    My theme is actually public on github. Is there a chance that someone of the Publii team can look into it it tells me what Im doing wrong here?

    https://github.com/enslaved2die/Publii_Joshua/tree/v2

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.