<?php
/**
 * RSM Editor — portable rich-text module (Content Widgets host; rsm-shared candidate).
 *
 * @package Rsmspark_Editor
 */

defined( 'ABSPATH' ) || exit;

if ( ! defined( 'RSMSPARK_RICH_TEXT_VERSION' ) ) {
	define( 'RSMSPARK_RICH_TEXT_VERSION', '1.5.11' );
}

if ( ! defined( 'RSMSPARK_RICH_TEXT_PATH' ) ) {
	define( 'RSMSPARK_RICH_TEXT_PATH', trailingslashit( dirname( __FILE__ ) ) );
}

if ( ! defined( 'RSMSPARK_RICH_TEXT_URL' ) ) {
	if ( defined( 'RSMSPARK_CONTENT_WIDGETS_URL' ) ) {
		define( 'RSMSPARK_RICH_TEXT_URL', trailingslashit( RSMSPARK_CONTENT_WIDGETS_URL ) . 'includes/rsm-editor/' );
	} else {
		$rsmspark_rich_text_host = dirname( __DIR__, 2 ) . '/rsm-content-widgets.php';
		define( 'RSMSPARK_RICH_TEXT_URL', trailingslashit( plugin_dir_url( $rsmspark_rich_text_host ) ) . 'includes/rsm-editor/' );
	}
}

require_once RSMSPARK_RICH_TEXT_PATH . 'class-rsmspark-rich-text-registry.php';
require_once RSMSPARK_RICH_TEXT_PATH . 'class-rsmspark-rich-text-standards.php';
require_once RSMSPARK_RICH_TEXT_PATH . 'class-rsmspark-rich-text-body.php';
require_once RSMSPARK_RICH_TEXT_PATH . 'class-rsmspark-rich-text.php';
require_once RSMSPARK_RICH_TEXT_PATH . 'class-rsmspark-rich-text-tinymce.php';
require_once RSMSPARK_RICH_TEXT_PATH . 'class-rsmspark-rich-text-editor-ui.php';
require_once RSMSPARK_RICH_TEXT_PATH . 'class-rsmspark-rich-text-assets.php';

Rsmspark_Rich_Text_TinyMCE::init();
Rsmspark_Rich_Text_Editor_UI::init();
Rsmspark_Rich_Text_Assets::init();
