SharePoint design manager: how to insert a RichHtmlField? - sharepoint-2013

I have created a site column of type Multiple lines of text and added it to a content type.
I have then created a page layout with the design manager using this content type.
The field inserted in the page layout is always a NoteField but I would like a RichHtmlField.
I don't know how to configure the field in the Snippet Gallery.
I have tried to specified the type of text to allow for the site column:
Rich text (Bold, italics, text alignment, hyperlinks)
Enhanced rich text (Rich text with pictures, tables, and hyperlinks)
It doesn't matter what I choose, I always end up with a NoteField.

Apparently, instead of choosing a site column of type Multiple lines of text, choosing the type Publishing HTML (Full HTML content with formatting and constraints for publishing) brings the rich editor needed. Still seems weird though.

Related

Adding HTML Text the right way in Experience editor

Our content author is more comfortable using Experience editor than the content editor and also has knowledge of HTML.
The requirement is - the author should also be able to add text - along with other components (carousel, banner, etc), or just create a whole HTML page using Rich text editor if they need to.
For eg: He will open Experience editor of a page, add a banner component and then below the banned wants to add text. (or maybe just design the whole page using HTML)
I'm handling this kind of task for the first time and here is what I did.
Create the following:
1. A template with the name "Rich Text Section", which has one field "Content" of type "Rich Text".
2. A View Rendering, "Rich Text Component", that points to a .cshtml which is a simple HTML
<div class="row">
#Html.Sitecore().Field("Content", Model)
</div>
A folder "Rich Text Sections" under Sitecore > Content > Home > Components. In this folder, the author can add only "Rich Text Section" templates.
To add text to/or design a page, the author needs to do the following.
Browse in content editor mode. Add a new item (say "LoremIpsum"), of template type "Rich Text", inside the "Rich Text Sections" folder.
Browse in Experience editor mode. Add the "Rich Text Component", set its data source to "LoremIpsum", and then write all the HTML content inside.
Here, the author has to switch to both editor modes. Please advise the better way to do this.
If you have the Insert Options set up correctly on the items in your solution, then from the Experience Editor you can use Insert Page from the Home tab on Ribbon. This will then pop up a modal showing all the Templates that have been configured as Insert Options, the same ones as if you were to right click on a node in the Content Editor and select the Insert option.
The page will be created as a child of the page you are currently on. You can navigate to different sections of the content tree by enabling the Navigation Bar option from the View Ribbon, selecting the page and selecting "Go".
EDIT: I mis-read your question. It seems you are trying to create the Datasource of the item when a component is added using the Experience Editor.
You need to set the Datasource Location and Datasource Template fields on the definition item of your Rendering:
Make sure you leave the Data source field empty on the Rendering item. Now when you add the component you will be prompted to Select the Associated Content. Your editors will be able to select existing content or create new ones.
You can read more in this blog post.

Sitecore 8 implement tooltip on RTE authored content

We have a requirement to implement tooltips for words that are authored in Sitecore RTE.
The idea behind is that user should be able to hover over the word and see it's description/meaning.
Is this possible to achieve in sitecore? Did a quick search on marketplace but could not find any modules.
Below are some options to consider for achieving what you described.
Inject Tooltip HTML in a renderField pipeline
In this option, you would extend the renderField pipeline. First, you will need to ensure that you are dealing with a rich-text field, and if so, locate terms and replace them with the necessary markup that is required for the tooltip. This could be as simple as wrapping the word in an <abbr> or perhaps a <span> element with a CSS class. The list of terms and tooltip content could be sourced from items in Sitecore or a custom Sitecore Dictionary. Caching the terms would be essential as this pipeline processor is invoked frequently every time a field is rendereded.
Progressive enhancement with JavaScript
This approach is almost entirely based on the client-side. Terms could be located and replaced fairly easily with the help of JQuery. If the list of terms is of a reasonable size, they could be bootstrapped into a JavaScript variable. Once terms are located and enhanced, a separate, asynchronous call to a REST endpoint could be made when hovering or clicking the term. The API would accept a term and respond with the term's definition.
HTML Snippet in RTE Editor
Sitecore RTE editor can be extended with additional buttons. One of these options allows you to insert predefined snippets of HTML. The RTE editor also has a setting to specify a CSS file to style the content within the field (<setting name="WebStylesheet" value="/css/yourstylesheet.css" />). Styling would be necessary in order to target the description markup and make it visible to be edited, whereas, on the public site, the description markup would normally be hidden by default until the term is clicked on or hovered over.
Dynamic Link Replacement
http://www.layerworks.com/blog/sitecore-token-replacement

Sitecore: Field type that has both the options from multiline-text and RichText?

Is it possible to have a field in Sitecore (6.5) that is a "merge" of multiline-text and RichText?
More specificly, what i am looking for, is a RichText field, where i can insert content into the field, without opening the editor first. Just like you can with a multiline-text field.
So a RichText editor field, with the standard options, but also the ability to paste/enter text into the plain field without opening the editor it self?
Select the "View" tab in Sitecore and check the "Raw Values" box. Now your Rich-Text fields will display the HTML contents. In Raw Values mode, you can edit, copy and paste raw HTML without opening any editors. This will also cause other fields to have their raw values exposed. You can stay in raw values mode and edit other items or exit out of it at any time.
You can easily paste in plain text into a Rich Text field. In the content editor, just click on the "Show HTML" link above the RT field. That will open up the plain text editor, instead of the RTE.

Customized Rich Text Editor in Sitecore to generate BBCode tags instead of HTML

I am currently creating a mobile site using Sitecore, where I cannot use HTML as markup instead need to use BML as markup language for mobile. Please let me know the following in this regard:
We have a field called Description and its of type RICH TEXT. Here we cannot use the normal Rich Text Editor given by the Sitecore as it generates HTML. So can anyone tell me if I can create a customized RICH TEXT Editor with a button Say "Mobile Bold" and which should generate tags for mobile instead of normal HTML <b></b> tags .
As you all know we can change the RICH TEXT Editor from Default to FULL by setting the source attribute of the field to /sitecore/system/Settings/Html Editor Profiles/Rich Text Full. So in the similar way can I create one more item in the Core DB as /sitecore/system/Settings/Html Editor Profiles/MobileRichTextFull and include customized buttons to it so as to generate BML tags as described above. If this is possible let me know what are all the settings need to be done and steps to be followed for the same.
do you want the users to edit BML directly, or are you able to transform HTML to BML?
For the latter, you'd better solve this in the presentation layer/pipeline.
HTML Agility Pack will be your friend when going for this last solution.
Otherwise, look at Teleriks resources about the editor.

Using richtext in QTextEdit

What is exactly richtext and how do I format data in richtext in QTextEdit?
The internal rich text format is tag/attribute-based, and is similar to HTML using in-line CSS style="xxx" attributes. The default export/import format (using toHTML/setHTML) is a subset of HTML. See this link:
http://doc.trolltech.com/4.6/richtext-html-subset.html
Note that CSS classes are not supported internally and are converted to their representing attributes at import.
QTextEdit can display text that is formatted with additional layout and style information (i.e. enriched) which can be set either programatically or by using a subset of HTML.
The Rich Text Processing documentation gives you an overview and pointers to more in-depth information.
If you're looking for a WYSIWYG toolbar for the QTextEdit, you'll end up disappointed. There is no default one (although the SDK contains an example app). So you should either make the toolbar yourself or find one.