Issue #3157Opened November 25, 2020by pranay22100 reactions

BUG:

Question

I want to apply script to rte element which is select html element, on selecting the value for from one select field the dynamic values should get appended to other select field but the script is not working in rte Screenshot 2020-11-25 at 1 30 28 PM

 rte.add('custom-parentkey', {
                icon: htmlForParent,
                  // Bind the 'result' on 'change' listener
                event: 'change',
                result: (rte, action) => {
  // Here I want to get the field value and get the result dynamically and append it to other select field but the script 
is not working
 alert(JSON.stringfy(rte))
//rte.insertHTML("<first>HELLLLLOOOO</first>")
                },
                update: (rte, action) => { action.btn.firstChild.value = "";}
              })
         rte.add('custom-childkey', {
            icon: htmlForChild,
              // Bind the 'result' on 'change' listener
            event: 'change',
            result: (rte, action) => {},
            // Reset the select on change
            update: (rte, action) => { }
          })

I even tried initialising {allowScript:1} in the editor.init() still didn't work

Answers (1)

artfNovember 27, 20200 reactions

Maybe because it's stringify and not stringfy...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.