Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to prevent EditorJS to save HTML at all #1833

Closed
qhantom opened this issue Dec 8, 2021 · 1 comment
Closed

Ability to prevent EditorJS to save HTML at all #1833

qhantom opened this issue Dec 8, 2021 · 1 comment

Comments

@qhantom
Copy link

qhantom commented Dec 8, 2021

I wonder whether it is possible to completely prevent that EditorJS saves HTML-Tags in their blocks (i.e. <a>link</a>) and format it in another way as anchor (i.e. another object).

This is an example of EditorJS' way:

 {
  type : 'paragraph',
  data : {
    text : `There are dozens of <a href="https://github.com/editor-js">ready-to-use Blocks</a> and the simple API for creation any Block you need. For example, you can implement Blocks for Tweets, Instagram posts, surveys and polls, CTA-buttons and even games.`
  }
}

Suggestion/Approach:

 {
  type : 'paragraph',
  data : {
    text : `There are dozens of`
  }
},
{
  type : 'anchor',
  data : {
    text : `ready-to-use Blocks`,
    link: "https://github.com/editor-js"
  }
},
{
  type : 'paragraph',
  data : {
    text : `and the simple API for creation any Block you need. For example, you can implement Blocks for Tweets, Instagram posts, surveys and polls, CTA-buttons and even games.`
  }
},

I don't like the idea to store HTML inside the database and I don't like to mix and match HTML with JSON.

Thanks for the great lib anyway :-)

@qhantom qhantom changed the title Ability to prevent EditorJS to not save HTML at all Ability to prevent EditorJS to save HTML at all Dec 8, 2021
@woren951
Copy link
Contributor

woren951 commented Dec 9, 2021

#1801 :)

@codex-team codex-team locked and limited conversation to collaborators Jan 17, 2022
@talyguryn talyguryn converted this issue into discussion #1915 Jan 17, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants