Code Monkey home page Code Monkey logo

Comments (8)

ppeeou avatar ppeeou commented on June 17, 2024 2

Conversation with @hackerwins
Embed data (video, image ..) has a size of 1 like space bar in content and decided to use attributes field.

After this issue is solved, PR can be registered.

from yorkie-js-sdk.

hackerwins avatar hackerwins commented on June 17, 2024 1

@ppeeou Sure. If you have any questions while proceeding, please let me know.

from yorkie-js-sdk.

mojosoeun avatar mojosoeun commented on June 17, 2024 1

@ppeeou Can I try this issue if you are okay?

from yorkie-js-sdk.

ppeeou avatar ppeeou commented on June 17, 2024

Could I try this issue??!

from yorkie-js-sdk.

ppeeou avatar ppeeou commented on June 17, 2024

@hackerwins In the case of Quill, the value contains the type according to text, images, and video.
This value is already loaded in memory, so it can easily distinguish the type.

However, in the case of yorkie, when serializing value and storing it on the server and passing it to the client, the client must handle whether the value is images, video, or text through JSON.parse.

  • if we don't define a type.
try{
  return JSON.parse(content) // object
}catch{
  return content; // string 
}

So, I prefer to follow Quill as it is, but I think we need to define the value inevitably. What do you think??

from yorkie-js-sdk.

hackerwins avatar hackerwins commented on June 17, 2024

@ppeeou Thanks for the good comments. It's been a while since I saw this issue, so I don't remember it well.
As you suggested, I think we should have an explicit type in RichText.

from yorkie-js-sdk.

ppeeou avatar ppeeou commented on June 17, 2024

@hackerwins

I have a question regarding this issue..!
I thought the issue only had to be extended by type

In Quill, when data such as image and video are inserted, the size is set to 1 (retain difference is 1), so it can be used like deleting text when using something like delete.

I think we should also receive the size from RichText, not the length of the string from and to (the size depends on the contentType, and the actual content can be base64, URL..)

I have no idea how to change it in the current structure 😭

from yorkie-js-sdk.

ppeeou avatar ppeeou commented on June 17, 2024

oh... yes 😵‍💫
thank you @mojosoeun

from yorkie-js-sdk.

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.