Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Manish 373 posts 932 karma points
    Feb 20, 2017 @ 06:18
    Manish
    0

    Heading tag h1, h2, h3 not appearing in RichText editor in grid

    Hi all

    I am using umbraco version 7.5. here is my TinyMCE config file

    <validElements>
        <![CDATA[+a[id|style|rel|data-id|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|
    ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],
    -strike[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|reversed|start|style|type],-ul[class|style],-li[class|style],br[class],
    img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align|umbracoorgwidth|umbracoorgheight|onresize|onresizestart|onresizeend|rel|data-id],
    -sub[style|class],-sup[style|class],-blockquote[dir|style|class],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],
    -tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],
    thead[id|class],tfoot[id|class],#td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],
    -th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],
    -span[class|align|style],-pre[class|align|style],address[class|align|style],-h1[id|dir|class|align|style],-h2[id|dir|class|align|style],
    -h3[id|dir|class|align|style],-h4[id|dir|class|align|style],-h5[id|dir|class|align|style],-h6[id|style|dir|class|align|style],hr[class|style],
    dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang],object[class|id|width|height|codebase|*],
    param[name|value|_value|class],embed[type|width|height|src|class|*],map[name|class],area[shape|coords|href|alt|target|class],bdo[class],button[class],iframe[*]]]>
      </validElements>
    

    Which clearly show that there is h1, h2... tags reside inside this. But when I added RTE to grid it is nowhere showing option to add Headings.

    Thanks Manish

  • Dennis Adolfi 1082 posts 6450 karma points MVP 6x c-trib
    Feb 20, 2017 @ 07:14
    Dennis Adolfi
    101

    Hello Manish.

    I think what you want is the "Insert formats" function for the RTE. The validElements is only a validation which element is allowed to use in the editor, any element not present in the validElements will be removed by the RTE.

    Insead I suggest you do the following:

    1- Create a stylesheet in the Settings section, called editor.css. Add the following css to that file:

    enter image description here

    /**umb_name:Heading 1*/
    h1{}
    
    /**umb_name:Heading 2*/
    h2{}
    
    /**umb_name:Heading 3*/
    h3{}
    

    2- Go and edit the Grid. In the RTE settings for the grid, make sure to select the new editor.css file. See animation:

    enter image description here

    All done, now you should be able to see the options for inserting heading.

    enter image description here

    Hope this was helpful!

    Have a great day!

  • Manish 373 posts 932 karma points
    Feb 20, 2017 @ 08:23
    Manish
    0

    Many thanks Dennis

  • Manish 373 posts 932 karma points
    Feb 20, 2017 @ 08:31
    Manish
    1

    Many thanks Dennis

  • Dennis Adolfi 1082 posts 6450 karma points MVP 6x c-trib
    Feb 20, 2017 @ 09:43
    Dennis Adolfi
    0

    Glad to help Manish!

    Take care!

  • Manish 373 posts 932 karma points
    Feb 28, 2017 @ 09:40
    Manish
    0

    Hi Dennis

    How to add for paragraph under heading tag so when user choose paragraph it remove the heading format and change to heading.

    Thanks

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies