Text Edit in API


#1

Hi @Norm ,

Trying to edit some text set up as a Text Area.

The default text set in interface tab is coming into the design area ok.
But when I edit the text in the text area, it doesn’t update in the design view.
I tried restarted Blocs w/ no change.

Simple example in edit-mode js:
global variable:
var myText = $(’.myclass’);

function setText(V) {
myText.text(V);
window.webkit.messageHandlers.sync.postMessage(“changes”);
}

I’m assuming that every instance of a bric will know which bric is selected and the js will only change that bric & leave other similar brics alone.

What am I missing ?

Also on a sidenote - how would I target all brics w/ same class, assuming js is per bric?

Thanks, Bill


#2

I’ll take a look at this, if you connect that function to a text field input does it work correctly?


#3

Hi Norm,

I tried editing in the interface ( removing the text area input & adding a text field w/ same function, etc)
Hit save, then restarted Blocs - the changes are missing (BIG BUG)

I also tried making the changes, then exporting out .bex , deleting the original bric & then double-clicking on the new .bex to bring it in - still old controls :frowning:

Bizarre, but changes don’t seem to be saving to .bex, as far as I can tell.

Thanks, Bill


#4

Hi @Norm
Hope you saw my response, as I can’t save anything to a custom bric. Running v2.5b8
Kind of dead in the water :wink:

Thanks, Bill


#5

Oh really! Even to a brand new bric?


#6

Bill I just ran a few tests and I can create add and save Ui items to my current and new custom Brics. I think your Bric may have some kind of glitch in it thats preventing saving it. Andy chance you could DM it to me so I can take a look?