Sign in

HTML code editors removes code!

  • This topic has 15 replies, 4 voices, and was last updated 1 month, 1 week ago by .
Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #767
    Avatar photoRKR

    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
    Avatar photoRKR

    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
    Avatar photoRKR

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

    #776
    Avatar photoTomasz Dziuda

    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
    Avatar photoenslaved2die

    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
    Avatar photoTomasz Dziuda

    @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
    Avatar photoTomasz Dziuda

    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
    Avatar photoenslaved2die

    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

    #8158
    Avatar photocandidexmedia
    #8306
    Avatar photoTomasz Dziuda

    @candidexmedia – you can temporary solve your issue with custom TinyMCE config using:

    valid_children: '+a[div|p|figure|pre|h1|h2|h3|h4|h5|h6|header|footer|article|aside|section|table|blockquote|video]',
    It will be added by default in Publii v.0.41

    --
    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!

    #8310
    Avatar photocandidexmedia

    @candidexmedia – you can temporary solve your issue with custom TinyMCE config using:

    <span class=”enlighter-text”>valid_children: </span><span class=”enlighter-s0″>’+a[div|p|figure|pre|h1|h2|h3|h4|h5|h6|header|footer|article|aside|section|table|blockquote|video]'</span><span class=”enlighter-text”>,</span>
    valid_children: ‘+a[div|p|figure|pre|h1|h2|h3|h4|h5|h6|header|footer|article|aside|section|table|blockquote|video]’,

    valid_children: ‘+a[div|p|figure|pre|h1|h2|h3|h4|h5|h6|header|footer|article|aside|section|table|blockquote|video]’,

    It will be added by default in Publii v.0.41

    Hi Tomasz: Where should I paste this code?

    #8311
    Avatar photoTomasz Dziuda

    For example in the way described here: https://getpublii.com/dev/how-to-add-custom-config-or-js-for-post-editor/

    --
    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!

    #8340
    Avatar photocandidexmedia

    For example in the way described here: https://getpublii.com/dev/how-to-add-custom-config-or-js-for-post-editor/

    Is the code <span style=”color: #999999;”>(valid_children: ‘+a[div|p|figure|pre|h1|h2|h3|h4|h5|h6|header|footer|article|aside|section|table|blockquote|video]’,</span>
    <span style=”color: #999999;”>It will be added by default in Publii v.0.41)</span> supposed to be pasted in tinymce.override.json or tinymce.script.js? In which folder are those two files meant to be saved in?

    #8488
    Avatar photoTomasz Dziuda

    Hi,

    As it is mentioned:

    Then please add in the theme root directory the following files:

    --
    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!

    #8567
    Avatar photocandidexmedia

    Hi,

    As it is mentioned:

    Then please add in the theme root directory the following files:

    What does “theme root directory” mean? Which folder does this refer to (see screenshot)?

     

    Also, my first question still remains: Is the code supposed to be pasted in tinymce.override.json or tinymce.script.js?

     

    The code in question is “valid_children: ‘+a[div|p|figure|pre|h1|h2|h3|h4|h5|h6|header|footer|ar…”

    Attachments:
    #8580
    Avatar photoTomasz Dziuda

    Theme root is a main directory of your currently used theme. For configuration overrides you must use tinymce.override.json as it is dedicated to override editor settings, tinymce.script.js is used to add additional JS behaviours (not required in your case).

    In your case you must create the tinymce.override.json with content like:

    {

    valid_children: ‘…’

    }

    --
    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!

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