mirror of
https://github.com/codex-team/editor.js
synced 2026-03-17 08:05:47 +01:00
editor.settings.placeholder
This commit is contained in:
parent
73ebe4162f
commit
dfdaba6bb1
5 changed files with 7 additions and 7 deletions
|
|
@ -45,6 +45,8 @@ module.exports = (function (core) {
|
|||
|
||||
editor.hideToolbar = userSettings.hideToolbar;
|
||||
|
||||
editor.settings.placeholder = userSettings.placeholder || '';
|
||||
|
||||
editor.nodes.holder = document.getElementById(userSettings.holderId || editor.settings.holderId);
|
||||
|
||||
if (typeof editor.nodes.holder === undefined || editor.nodes.holder === null) {
|
||||
|
|
|
|||
|
|
@ -405,9 +405,7 @@ module.exports = (function (ui) {
|
|||
|
||||
initialBlock = editor.tools[initialBlockType].render();
|
||||
|
||||
let initialBlockPlaceholder = editor.state.blocks.placeholder || '';
|
||||
|
||||
initialBlock.setAttribute('data-placeholder', initialBlockPlaceholder);
|
||||
initialBlock.setAttribute('data-placeholder', editor.settings.placeholder);
|
||||
|
||||
editor.content.insertBlock({
|
||||
type : initialBlockType,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue