<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Second styles plugin in RTE - Touch UI AEM 6.3 in Adobe Experience Manager Discussions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/second-styles-plugin-in-rte-touch-ui-aem-6-3/m-p/284452#M16909</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can someone answer this query too, thanks &lt;A href="https://forums.adobe.com/thread/1258832"&gt;[rtePlugins - Styles] Put selected style on the highlighted object instead of in a span?&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Aug 2018 14:15:16 GMT</pubDate>
    <dc:creator>CT1012</dc:creator>
    <dc:date>2018-08-22T14:15:16Z</dc:date>
    <item>
      <title>Second styles plugin in RTE - Touch UI AEM 6.3</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/second-styles-plugin-in-rte-touch-ui-aem-6-3/m-p/284450#M16907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can i create second styles plugin in RTE with the classes of font-sizes.. I'm seeing the following error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Uncaught TypeError: Cannot read property 'isAnyFeatureEnabled' of undefined&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried creating a new client-lib by copying styles plugin from &lt;STRONG&gt;/libs/clientlibs/granite/coralui2/optional/rte/js/components/rte/plugins/StylesPlugin.js &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;with the node structure&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&amp;lt;sizes&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jcr:primaryType="nt:unstructured"&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; features="*"&amp;gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;styles jcr:primaryType="cq:WidgetCollection"&amp;gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/styles&amp;gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt; &amp;lt;/sizes&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;With the below code Js&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CUI.rte.plugins.StylesPlugin = new Class({&lt;/P&gt;&lt;P&gt;toString: "StylePlugin",&lt;/P&gt;&lt;P&gt;extend: CUI.rte.plugins.Plugin,&lt;/P&gt;&lt;P&gt;stylesUI: null,&lt;/P&gt;&lt;P&gt;getFeatures: function() {&lt;/P&gt;&lt;P&gt;return [ "styles" ];&lt;/P&gt;&lt;P&gt;},&lt;/P&gt;&lt;P&gt;reportStyles: function() {&lt;/P&gt;&lt;P&gt;return [ {&lt;/P&gt;&lt;P&gt;"type": "text",&lt;/P&gt;&lt;P&gt;"styles": this.getStyles()&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;},&lt;/P&gt;&lt;P&gt;getStyles: function() {&lt;/P&gt;&lt;P&gt;var com = CUI.rte.Common;&lt;/P&gt;&lt;P&gt;if (!this.cachedStyles) {&lt;/P&gt;&lt;P&gt;this.cachedStyles = this.config.styles;&lt;/P&gt;&lt;P&gt;if (this.cachedStyles) {&lt;/P&gt;&lt;P&gt;// take styles from config&lt;/P&gt;&lt;P&gt;com.removeJcrData(this.cachedStyles);&lt;/P&gt;&lt;P&gt;this.cachedStyles = com.toArray(this.cachedStyles, "cssName", "text");&lt;/P&gt;&lt;P&gt;} else {&lt;/P&gt;&lt;P&gt;this.cachedStyles = [ ];&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;return this.cachedStyles;&lt;/P&gt;&lt;P&gt;},&lt;/P&gt;&lt;P&gt;setStyles: function(styles) {&lt;/P&gt;&lt;P&gt;this.cachedStyles = styles;&lt;/P&gt;&lt;P&gt;},&lt;/P&gt;&lt;P&gt;hasStylesConfigured: function() {&lt;/P&gt;&lt;P&gt;return !!this.config.styles;&lt;/P&gt;&lt;P&gt;},&lt;/P&gt;&lt;P&gt;initializeUI: function(tbGenerator, options) {&lt;/P&gt;&lt;P&gt;var plg = CUI.rte.plugins;&lt;/P&gt;&lt;P&gt;if (this.isFeatureEnabled("styles")) {&lt;/P&gt;&lt;P&gt;this.stylesUI = new tbGenerator.createStyleSelector("styles", this, null,&lt;/P&gt;&lt;P&gt;this.getStyles());&lt;/P&gt;&lt;P&gt;tbGenerator.addElement("styles", plg.Plugin.SORT_STYLES, this.stylesUI, 10);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;},&lt;/P&gt;&lt;P&gt;notifyPluginConfig: function(pluginConfig) {&lt;/P&gt;&lt;P&gt;pluginConfig = pluginConfig || { };&lt;/P&gt;&lt;P&gt;CUI.rte.Utils.applyDefaults(pluginConfig, { });&lt;/P&gt;&lt;P&gt;this.config = pluginConfig;&lt;/P&gt;&lt;P&gt;},&lt;/P&gt;&lt;P&gt;execute: function(cmdId, styleDef) {&lt;/P&gt;&lt;P&gt;if (!this.stylesUI) {&lt;/P&gt;&lt;P&gt;return;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;var cmd = null;&lt;/P&gt;&lt;P&gt;var tagName = undefined;&lt;/P&gt;&lt;P&gt;var className = undefined;&lt;/P&gt;&lt;P&gt;switch (cmdId.toLowerCase()) {&lt;/P&gt;&lt;P&gt;case "applystyle":&lt;/P&gt;&lt;P&gt;cmd = "style";&lt;/P&gt;&lt;P&gt;tagName = "span";&lt;/P&gt;&lt;P&gt;className = (styleDef != null ? styleDef&lt;/P&gt;&lt;P&gt;: this.stylesUI.getSelectedStyle());&lt;/P&gt;&lt;P&gt;break;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;if (cmd &amp;amp;&amp;amp; tagName &amp;amp;&amp;amp; className) {&lt;/P&gt;&lt;P&gt;this.editorKernel.relayCmd(cmd, {&lt;/P&gt;&lt;P&gt;"tag": tagName,&lt;/P&gt;&lt;P&gt;"attributes": {&lt;/P&gt;&lt;P&gt;"class": className&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;},&lt;/P&gt;&lt;P&gt;updateState: function(selDef) {&lt;/P&gt;&lt;P&gt;if (!this.stylesUI) {&lt;/P&gt;&lt;P&gt;return;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;var com = CUI.rte.Common;&lt;/P&gt;&lt;P&gt;var styles = selDef.startStyles;&lt;/P&gt;&lt;P&gt;var actualStyles = [ ];&lt;/P&gt;&lt;P&gt;var s;&lt;/P&gt;&lt;P&gt;var styleableObject = selDef.selectedDom;&lt;/P&gt;&lt;P&gt;if (styleableObject) {&lt;/P&gt;&lt;P&gt;if (!CUI.rte.Common.isTag(selDef.selectedDom,&lt;/P&gt;&lt;P&gt;CUI.rte.plugins.StylesPlugin.STYLEABLE_OBJECTS)) {&lt;/P&gt;&lt;P&gt;styleableObject = null;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;var stylesDef = this.getStyles();&lt;/P&gt;&lt;P&gt;var styleCnt = stylesDef.length;&lt;/P&gt;&lt;P&gt;if (styleableObject) {&lt;/P&gt;&lt;P&gt;for (s = 0; s &amp;lt; styleCnt; s++) {&lt;/P&gt;&lt;P&gt;var styleName = stylesDef[s].cssName;&lt;/P&gt;&lt;P&gt;if (com.hasCSS(styleableObject, styleName)) {&lt;/P&gt;&lt;P&gt;actualStyles.push({&lt;/P&gt;&lt;P&gt;"className": styleName&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;} else {&lt;/P&gt;&lt;P&gt;var checkCnt = styles.length;&lt;/P&gt;&lt;P&gt;for (var c = 0; c &amp;lt; checkCnt; c++) {&lt;/P&gt;&lt;P&gt;var styleToProcess = styles[c];&lt;/P&gt;&lt;P&gt;for (s = 0; s &amp;lt; styleCnt; s++) {&lt;/P&gt;&lt;P&gt;if (stylesDef[s].cssName == styleToProcess.className) {&lt;/P&gt;&lt;P&gt;actualStyles.push(styleToProcess);&lt;/P&gt;&lt;P&gt;break;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;this.stylesUI.selectStyles(actualStyles, selDef);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;/**&lt;/P&gt;&lt;P&gt;* Array with tag names that define objects (like images) that are styleable when selected&lt;/P&gt;&lt;P&gt;* @private&lt;/P&gt;&lt;P&gt;* @static&lt;/P&gt;&lt;P&gt;* @final&lt;/P&gt;&lt;P&gt;* @type String[]&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;CUI.rte.plugins.StylesPlugin.STYLEABLE_OBJECTS = [&lt;/P&gt;&lt;P&gt;"img"&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;// register plugin&lt;/P&gt;&lt;P&gt;CUI.rte.plugins.PluginRegistry.register("sizes", CUI.rte.plugins.StylesPlugin);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2018 18:34:51 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/second-styles-plugin-in-rte-touch-ui-aem-6-3/m-p/284450#M16907</guid>
      <dc:creator>CT1012</dc:creator>
      <dc:date>2018-08-09T18:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Second styles plugin in RTE - Touch UI AEM 6.3</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/second-styles-plugin-in-rte-touch-ui-aem-6-3/m-p/284451#M16908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2018 17:56:34 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/second-styles-plugin-in-rte-touch-ui-aem-6-3/m-p/284451#M16908</guid>
      <dc:creator>CT1012</dc:creator>
      <dc:date>2018-08-14T17:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Second styles plugin in RTE - Touch UI AEM 6.3</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/second-styles-plugin-in-rte-touch-ui-aem-6-3/m-p/284452#M16909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can someone answer this query too, thanks &lt;A href="https://forums.adobe.com/thread/1258832"&gt;[rtePlugins - Styles] Put selected style on the highlighted object instead of in a span?&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 14:15:16 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/second-styles-plugin-in-rte-touch-ui-aem-6-3/m-p/284452#M16909</guid>
      <dc:creator>CT1012</dc:creator>
      <dc:date>2018-08-22T14:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Second styles plugin in RTE - Touch UI AEM 6.3</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/second-styles-plugin-in-rte-touch-ui-aem-6-3/m-p/452387#M33081</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="10457122"&gt;&lt;/LI-USER&gt;&amp;nbsp;, I am looking for similar implementation just like styles plugin. did you achieve this functionality. If yes, could you please help in this&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 06:49:06 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/second-styles-plugin-in-rte-touch-ui-aem-6-3/m-p/452387#M33081</guid>
      <dc:creator>praveenk9057427</dc:creator>
      <dc:date>2022-05-18T06:49:06Z</dc:date>
    </item>
  </channel>
</rss>

