How to use the tinymce.init function in tinymce

To help you get started, we’ve selected a few tinymce examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jirokun / survey-designer-js / lib / editor / components / question_editors / parts / MatrixTableEditorPart.js View on Github external
initTinyMCE() {
    const { survey, runtime, options, question, changeQuestionAttribute } = this.props;
    const node = runtime.findCurrentNode(survey);
    if (!node.isPage()) return;

    const page = runtime.findCurrentPage(survey);

    const toolbar = `free_mode_save free_mode_cancel | bold italic underline strikethrough forecolor backcolor removeformat table ' +
      'link unlink | alignleft aligncenter alignright alignjustify ${isDevelopment() ? ' | code' : ''} reference_answer image_manager`;

    const cssLinks = survey.getCssRuntimeUrls().concat(survey.getCssPreviewUrls()).toArray();
    tinymce.init({
      selector: `#${TINYMCE_ID}`,
      menubar: '',
      toolbar,
      plugins: `free_mode table contextmenu textcolor paste fullscreen link ${isDevelopment() ? 'code' : ''} reference_answer image_manager`,
      contextmenu: 'link inserttable | cell row column deletetable',
      body_class: 'm3-enquete__user-agent-group--PC',
      body_id: 'content',
      verify_html: false, // trueだと要素や属性が削除されることがある
      content_css: cssLinks,
      cache_suffix: options.getCacheSuffix(),
      imageManagerUrl: options.getImageManagerUrl(),
      init_instance_callback: this.handleTinyMCEInit.bind(this),
      freeModeSaveCallback: () => {
        changeQuestionAttribute(page.getId(), question.getId(), 'matrixHtml', this.getMatrixHtmlFromTinyMCE());
        this.props.onHide();
      },
github QDMarkMan / vue-base-template / src / components / Editor.vue View on Github external
this.change = true
            const content = editor.getContent()
            this.$emit('input', content)
          })
        },
        setup(editor) {
          editor.on('FullscreenStateChanged', e => {
            this.fullscreen = e.state
          })
        },
        toolbar: this.toolbar,
        plugins: this.tools
      }
      // 合并setting
      Object.assign(setting, this.setting)
      tinymce.init(setting)
    },
    setContent(content) {
github IceInTheFire / timotaoshu / iview-admin-dev / src / views / home / bookContainer.vue View on Github external
this.$nextTick(() => {
                        let vm = this;
                        let height = document.body.offsetHeight - 300;
                        tinymce.init({
                            selector: '#tinymceEditer',
                            branding: false,
                            elementpath: false,
                            height: height,
                            language: 'zh_CN.GB2312',
                            // menubar: 'edit insert view format table tools',
                            // menubar: 'view',
                            menubar: 'insert',
                            plugins: [
                                // 'advlist autolink lists link image charmap print preview hr anchor pagebreak imagetools',
                                'preview code',
                                'paste'
                                // 'searchreplace visualblocks visualchars code fullpage',
                                // 'insertdatetime media nonbreaking save table contextmenu directionality',
                                // 'emoticons paste textcolor colorpicker textpattern imagetools codesample'
                            ],
github WordPress / gutenberg / docs / tinymce-per-block / src / external / wp-blocks / editable / index.js View on Github external
theme: false,
		inline: true,
		toolbar: false,
		skin_url: '//s1.wp.com/wp-includes/js/tinymce/skins/lightgray',
		entity_encoding: 'raw',
		setup: onSetup,
		formats: {
			strikethrough: { inline: 'del' }
		}
	};

	if ( inline ) {
		config.valid_elements = '#p,br,b,i,strong,em,del,a[href|target]';
	}

	tinymce.init( config );
}
github WordPress / gutenberg / docs / tinymce-single-react-ui / src / external / wp-blocks / editable / index.js View on Github external
theme: false,
		inline: true,
		toolbar: false,
		skin_url: '//s1.wp.com/wp-includes/js/tinymce/skins/lightgray',
		entity_encoding: 'raw',
		setup: onSetup,
		formats: {
			strikethrough: { inline: 'del' }
		}
	};

	if ( inline ) {
		config.valid_elements = '#p,br,b,i,strong,em,del,a[href|target]';
	}

	tinymce.init( config );
}
github cam-inc / viron / src / components / viron-wyswyg / index.js View on Github external
this.on('mount', () => {
    if (this.opts.ispreview) {
      return;
    }
    TinyMCE.init(ObjectAssign({}, baseConfig, customConfig));
  }).on('before-unmount', () => {
    if (this.opts.ispreview) {
github WordPress / gutenberg / docs / tinymce-single-react-ui / src / components / tinymce / tinymce-react-ui.js View on Github external
theme: false,
		inline: true,
		toolbar: false,
		skin_url: '//s1.wp.com/wp-includes/js/tinymce/skins/lightgray',
		entity_encoding: 'raw',
		setup: onSetup,
		formats: {
			strikethrough: { inline: 'del' }
		}
	};

	if ( inline ) {
		config.valid_elements = '#p,br,b,i,strong,em,del,a[href|target]';
	}

	tinymce.init( config );
}