<?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 How to change the labels of the Editor Widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/711439#M66148</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking into the JSAPI Editor Widget, there do not appear to be properties that I can update to alter the label of the widget itself or the accordion buttons within.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="/legacyfs/online/506281_Screen Shot 2020-09-03 at 1.07.15 PM.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to make those labels say something else, such as 'Issue Reporter', 'Edit a Report' and 'Create a new report'. Since there are no properties to alter, I thought I might be able to do this by grabbing the elements by their ID or Classname then updating the innerText property for each.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if that's the best approach and also not sure how to know when call a function to do it since the widget is added after the page has been loaded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Sep 2020 17:11:52 GMT</pubDate>
    <dc:creator>JohnMDye</dc:creator>
    <dc:date>2020-09-03T17:11:52Z</dc:date>
    <item>
      <title>How to change the labels of the Editor Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/711439#M66148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking into the JSAPI Editor Widget, there do not appear to be properties that I can update to alter the label of the widget itself or the accordion buttons within.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="/legacyfs/online/506281_Screen Shot 2020-09-03 at 1.07.15 PM.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to make those labels say something else, such as 'Issue Reporter', 'Edit a Report' and 'Create a new report'. Since there are no properties to alter, I thought I might be able to do this by grabbing the elements by their ID or Classname then updating the innerText property for each.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if that's the best approach and also not sure how to know when call a function to do it since the widget is added after the page has been loaded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2020 17:11:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/711439#M66148</guid>
      <dc:creator>JohnMDye</dc:creator>
      <dc:date>2020-09-03T17:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the labels of the Editor Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/711440#M66149</link>
      <description>&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Direct DOM manipulation is a good route:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8" /&amp;gt;
    &amp;lt;meta
      name="viewport"
      content="initial-scale=1,maximum-scale=1,user-scalable=no"
    /&amp;gt;
    &amp;lt;title&amp;gt;
      Edit features with the Editor widget | Sample | ArcGIS API for JavaScript
      4.16
    &amp;lt;/title&amp;gt;

    &amp;lt;link
      rel="stylesheet"
      href="https://js.arcgis.com/4.16/esri/themes/light/main.css"
    /&amp;gt;
    &amp;lt;script src="https://js.arcgis.com/4.16/"&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;style&amp;gt;
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      }

      .esri-editor .esri-item-list__scroller {
        max-height: 350px;
      }
    &amp;lt;/style&amp;gt;

    &amp;lt;script&amp;gt;
      require([
        "esri/WebMap",
        "esri/views/MapView",
        "esri/widgets/Editor"
      ], function (WebMap, MapView, Editor) {
        // Create a map from the referenced webmap item id
        let webmap = new WebMap({
          portalItem: {
            id: "6c5d657f1cb04a5eb78a450e3c699c2a"
          }
        });

        let view = new MapView({
          container: "viewDiv",
          map: webmap
        });

        view.when(function () {
          view.popup.autoOpenEnabled = false; //disable popups

          // Create the Editor
          let editor = new Editor({
            view: view
          });
          editor.viewModel.watch('state', function(state){
            if(state === 'ready'){
              setTimeout(function(){
				document.getElementsByClassName('esri-editor__title esri-heading')[0].innerHTML = 'Blah Editor';
                var actions = document.getElementsByClassName("esri-editor__feature-list-name");
                Array.from(actions).forEach(function(ele){
                  if(ele.innerHTML==='Edit feature'){
                    ele.innerHTML = 'blah blah Edit';
                  }
				  if(ele.innerHTML==='Add feature'){
                    ele.innerHTML = 'blah blah Add';
                  }
                });
              }, 50);
            }
          })

          // Add widget to top-right of the view
          view.ui.add(editor, "top-right");
        });
      });
    &amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body&amp;gt;
    &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;div id="editorDiv"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;/PRE&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:29:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/711440#M66149</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T06:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the labels of the Editor Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/711441#M66150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert! You'll turn me into a half decent JS developer yet!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2020 17:58:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/711441#M66150</guid>
      <dc:creator>JohnMDye</dc:creator>
      <dc:date>2020-09-03T17:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the labels of the Editor Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1088639#M74271</link>
      <description>&lt;P&gt;Has anyone got the label property to actually change the Editor Widget label?&lt;/P&gt;&lt;P&gt;See below, it doesn't work, I'm still getting the default "Editor" label...&lt;/P&gt;&lt;P&gt;The filterEnabled property has not effect also.&lt;/P&gt;&lt;P&gt;This is 4.20&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const editor = new Editor({
							view: view,
							layerInfos: layerInfos,
							label: 'Changed',
							allowedWorkflows: ['create'],
							container: 'addFeature',
							snappingOptions: {enabled: false},
							supportingWidgetDefaults: {
								featureTemplates:{
									filterEnabled: true,
									groupBy: 'none'
								}
							}
						});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 20:46:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1088639#M74271</guid>
      <dc:creator>danbecker</dc:creator>
      <dc:date>2021-08-12T20:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the labels of the Editor Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1118502#M75336</link>
      <description>&lt;P&gt;A little contribution. If you don't want to use Javascript to customise those labels you can use CSS like this:&lt;/P&gt;&lt;LI-CODE lang="css"&gt;.esri-editor__feature-list-name {
visibility: hidden;
color: red;
content: none;
}
.esri-editor__feature-list-item:nth-child(1) .esri-editor__feature-list-name:before {
visibility: visible;
content: "Edit your picture";
}
.esri-editor__feature-list-item:nth-child(2) .esri-editor__feature-list-name:before {
visibility: visible;
content: "Use your imagination";
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;To create something like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DouglasJimenez_0-1637285083035.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27878i716A1E458D298EA1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DouglasJimenez_0-1637285083035.png" alt="DouglasJimenez_0-1637285083035.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 01:24:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1118502#M75336</guid>
      <dc:creator>DouglasJimenez</dc:creator>
      <dc:date>2021-11-19T01:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the labels of the Editor Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1118983#M75363</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1104"&gt;@RobertScheitlin__GISP&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the solution.&lt;/P&gt;&lt;P&gt;Could you please explain why it is needed to use&lt;STRONG&gt;&amp;nbsp;&lt;SPAN&gt;setTimeout&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; to change the labels.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have seen that without it, the code does not work - but I do not understand why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 20 Nov 2021 09:36:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1118983#M75363</guid>
      <dc:creator>ZA1</dc:creator>
      <dc:date>2021-11-20T09:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the labels of the Editor Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1119167#M75368</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/538219"&gt;@ZA1&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;The timeout is required because even though the widgets state is reported as ready the DOM rendering is not always complete, so the DOM objects will not always be found.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 13:17:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1119167#M75368</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-11-22T13:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the labels of the Editor Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1119357#M75374</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1104"&gt;@RobertScheitlin__GISP&lt;/a&gt;&amp;nbsp;, much appreciated - also for all the helpful answers on this platform!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 21:20:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1119357#M75374</guid>
      <dc:creator>ZA1</dc:creator>
      <dc:date>2021-11-22T21:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the labels of the Editor Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1153748#M76658</link>
      <description>&lt;P&gt;You can do it like this, (there are a bunch of messages that you can change similarly) :&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;editor&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;when&lt;/SPAN&gt;(() =&amp;gt; &lt;SPAN&gt;{&lt;BR /&gt;&lt;/SPAN&gt;  &lt;SPAN&gt;editor&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;messages&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;widgetLabel &lt;/SPAN&gt;= &lt;SPAN&gt;"new title"&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;})&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 11:42:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1153748#M76658</guid>
      <dc:creator>RodrigoAbril</dc:creator>
      <dc:date>2022-03-15T11:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the labels of the Editor Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1154535#M76680</link>
      <description>&lt;P&gt;I like this solution with using CSS to modify the Editor widget display. I have done so with the label items based on your example and am trying to do so with the title. I have been able to change the color or hide it but am trying to also change the content from "Editor" to something else but content does not seem to do so in the below. Would you know what property can be set to change that label?&lt;/P&gt;&lt;P&gt;Here is the snippet I have:&lt;/P&gt;&lt;P&gt;.esri-editor__title {&lt;BR /&gt;text-align: center;&lt;BR /&gt;flex: 1 1 auto;&lt;BR /&gt;overflow: hidden;&lt;BR /&gt;color: blue;&lt;BR /&gt;content: "hello";&lt;BR /&gt;/*visibility: hidden;*/&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 21:32:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1154535#M76680</guid>
      <dc:creator>BruceSchneider2</dc:creator>
      <dc:date>2022-03-16T21:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the labels of the Editor Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1154543#M76681</link>
      <description>&lt;P&gt;Actually I was able to answer my own question in another way. I can change that using the following pattern as shown in another response - I just had a scoping issue that it wasn't working before.&lt;/P&gt;&lt;P&gt;updateEditor.when(() =&amp;gt; {&lt;BR /&gt;updateEditor.messages.widgetLabel = "My Title";&lt;BR /&gt;});&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 21:53:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1154543#M76681</guid>
      <dc:creator>BruceSchneider2</dc:creator>
      <dc:date>2022-03-16T21:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the labels of the Editor Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1351744#M82844</link>
      <description>&lt;P&gt;How we do the same task with ESRI API 4.24 and above?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 22:37:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-labels-of-the-editor-widget/m-p/1351744#M82844</guid>
      <dc:creator>harjinder_trimble</dc:creator>
      <dc:date>2023-11-20T22:37:52Z</dc:date>
    </item>
  </channel>
</rss>

