Giter VIP home page Giter VIP logo

Comments (3)

Pranomvignesh avatar Pranomvignesh commented on May 30, 2024

@tqwewe There are two cases in altering the editor value

  1. Changing the entire editor value ( let us assume, you want to break the existing blueprint structure and have a new structure)
  2. Replacing a new content in the current restricted area alone without changing the base blueprint

To achieve the first case, I would advise you to create a new model with that blueprint and just replace that model in the editor instance.

To achieve the second case, There is an method present in the constrained editor plugin : updateRestrictions. As I have the track of the range of the current restricted area, This method will update the value in that range.For this to work properly you have to provide a label to uniquely identify the restricted range.

PS : I guess this method's name is slightly ambiguous, I will change it to updateValueInRestrictedArea in the upcoming versions

I hope this helps you

from constrained-editor-plugin.

tqwewe avatar tqwewe commented on May 30, 2024

Thanks for all the info! I'll try it out shortly.

I guess this method's name is slightly ambiguous, I will change it to updateValueInRestrictedArea in the upcoming versions

I see on the documentation it says under updateRestrictions:

update the contents inside the editable ranges

updateValueInRestrictedArea sounds like you edit text outside the allowed editable area, but I think you mean it should update text in an editable area? Perhaps updateValueInEditableArea might be clearer?

from constrained-editor-plugin.

Pranomvignesh avatar Pranomvignesh commented on May 30, 2024

@tqwewe Thanks for the suggestion

Perhaps updateValueInEditableArea might be clearer

Yes, this seems more clear

from constrained-editor-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.