Open dgastudio opened 3 years ago
Use "window" for check client render only
render (
<div>
{window && <Editor>....</Editor>}
</div>
)
render() {
var _this = this // Add var
this.wrapper = document.createElement('div')
if (this.data && this.data.place) {
const iframe = document.createElement('iframe')
this.place = this.data.place
iframe.height = '500'
iframe.src = `https://maps.google.com/maps?q=${this.data.place}&t=&z=13&ie=UTF8&iwloc=&output=embed`
iframe.style ='width: 100%;border-radius: 10px;border: 1px solid #cccccc;'
this.wrapper.appendChild(iframe)
} else {
const input = document.createElement('input')
const button = document.createElement('button')
this.wrapper.classList.add('google-map-input')
this.wrapper.appendChild(input)
this.wrapper.appendChild(button)
button.innerHTML = this.config.searchValue || ''
input.placeholder = this.config.placeholder || ''
input.value = this.data && this.data.place ? this.data.place : ''
button.addEventListener('click', function (event){
// Change this to _this
_this._applyIFrame(input.value)
_this.wrapper.removeChild(input)
_this.wrapper.removeChild(button)
})
}
return this.wrapper
}
Hi, i have same issue with vuejs2 but there is no render . my editorjs code is here https://github.com/scenaristeur/noosphere/blob/main/src/views/EditorView.vue Where/How should i put this wrapper code ?
I forked, made changes to the src/index.js file and built the project
Hello,
editorjs: 2.22.1