sitecore - Adding HTML Text the right way in Experience editor -


our content author more comfortable using experience editor content editor , has knowledge of html.
requirement - author should able add text - along other components (carousel, banner, etc), or create whole html page using rich text editor if need to.

for eg: open experience editor of page, add banner component , below banned wants add text. (or maybe design whole page using html)

i'm handling kind of task first time , here did.

create following:
1. template name "rich text section", has 1 field "content" of type "rich text".
2. view rendering, "rich text component", points .cshtml simple html

<div class="row">       @html.sitecore().field("content", model)    </div> 
  1. a folder "rich text sections" under sitecore > content > home > components. in folder, author can add "rich text section" templates.

to add text to/or design page, author needs following.

  1. browse in content editor mode. add new item (say "loremipsum"), of template type "rich text", inside "rich text sections" folder.
  2. browse in experience editor mode. add "rich text component", set data source "loremipsum", , write html content inside.

here, author has switch both editor modes. please advise better way this.

if have insert options set correctly on items in solution, experience editor can use insert page home tab on ribbon. pop modal showing templates have been configured insert options, same ones if right click on node in content editor , select insert option.

insert page

the page created child of page on. can navigate different sections of content tree enabling navigation bar option view ribbon, selecting page , selecting "go".

navigate pages


edit: mis-read question. seems trying create datasource of item when component added using experience editor.

you need set datasource location , datasource template fields on definition item of rendering:

datasource location , template type

make sure leave data source field empty on rendering item. when add component prompted select associated content. editors able select existing content or create new ones.

select associated content

you can read more in blog post.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -